From cb0f82db9e62cd33d4f3c86d23982cc38fd5e140 Mon Sep 17 00:00:00 2001 From: Bill Gale Date: Tue, 28 May 2024 10:20:55 +0100 Subject: [PATCH] feat: update next client This includes moving the core api to a subpackage. Public api is now added to client. These are now accessed on the `next.Core` and `next.Public` fields. --- Makefile | 7 +- next/client.go | 31680 +------------- next/core/core.go | 34236 ++++++++++++++++ next/generate.sh | 14 +- ...penapi.json => katapult-core-openapi.json} | 1125 +- next/katapult-public-openapi.json | 1024 + next/public/public.go | 1601 + 7 files changed, 37995 insertions(+), 31692 deletions(-) create mode 100644 next/core/core.go rename next/{katapult-openapi.json => katapult-core-openapi.json} (93%) create mode 100644 next/katapult-public-openapi.json create mode 100644 next/public/public.go diff --git a/Makefile b/Makefile index 8592bde..b39c223 100644 --- a/Makefile +++ b/Makefile @@ -137,9 +137,10 @@ check-schemas: ( diff -rN "$(CURDIR)/schemas" "$(CHKDIR)/schemas" && rm -rf "$(CHKDIR)" ) \ || ( rm -rf "$(CHKDIR)" && exit 1 ) -.PHONY: retrieve-openapi-schema -retrieve-openapi-schema: - wget -O next/katapult-openapi.json https://api.katapult.io/core/v1/schema/openapi.json +.PHONY: retrieve-openapi-schemas +retrieve-openapi-schemas: + wget -O next/katapult-core-openapi.json https://api.katapult.io/core/v1/schema/openapi.json + wget -O next/katapult-public-openapi.json https://api.katapult.io/public/v1/schema/openapi.json # # Coverage diff --git a/next/client.go b/next/client.go index 379fed2..4606a0a 100644 --- a/next/client.go +++ b/next/client.go @@ -1,31667 +1,45 @@ -// Package next provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT. package next import ( - "bytes" - "context" - "encoding/json" "fmt" - "io" - "net/http" - "net/url" - "strings" - "github.com/deepmap/oapi-codegen/v2/pkg/securityprovider" - "github.com/oapi-codegen/runtime" + "github.com/krystal/go-katapult/next/core" + "github.com/krystal/go-katapult/next/public" ) -const ( - AuthenticatorScopes = "Authenticator.Scopes" -) - -// Defines values for CertificateNotFoundEnum. -const ( - CertificateNotFound CertificateNotFoundEnum = "certificate_not_found" -) - -// Defines values for CertificateStateEnum. -const ( - CertificateStateEnumIssueFailed CertificateStateEnum = "issue_failed" - CertificateStateEnumIssued CertificateStateEnum = "issued" - CertificateStateEnumIssuing CertificateStateEnum = "issuing" - CertificateStateEnumPending CertificateStateEnum = "pending" -) - -// Defines values for CountryNotFoundEnum. -const ( - CountryNotFound CountryNotFoundEnum = "country_not_found" -) - -// Defines values for CountryStateNotFoundEnum. -const ( - CountryStateNotFound CountryStateNotFoundEnum = "country_state_not_found" -) - -// Defines values for CurrencyNotFoundEnum. -const ( - CurrencyNotFound CurrencyNotFoundEnum = "currency_not_found" -) - -// Defines values for DNSRecordNotFoundEnum. -const ( - DnsRecordNotFound DNSRecordNotFoundEnum = "dns_record_not_found" -) - -// Defines values for DNSRecordTypesEnum. -const ( - DNSRecordTypesEnumA DNSRecordTypesEnum = "A" - DNSRecordTypesEnumAAAA DNSRecordTypesEnum = "AAAA" - DNSRecordTypesEnumALIAS DNSRecordTypesEnum = "ALIAS" - DNSRecordTypesEnumCAA DNSRecordTypesEnum = "CAA" - DNSRecordTypesEnumCNAME DNSRecordTypesEnum = "CNAME" - DNSRecordTypesEnumIPS DNSRecordTypesEnum = "IPS" - DNSRecordTypesEnumMX DNSRecordTypesEnum = "MX" - DNSRecordTypesEnumNS DNSRecordTypesEnum = "NS" - DNSRecordTypesEnumPTR DNSRecordTypesEnum = "PTR" - DNSRecordTypesEnumSOA DNSRecordTypesEnum = "SOA" - DNSRecordTypesEnumSRV DNSRecordTypesEnum = "SRV" - DNSRecordTypesEnumSSHFP DNSRecordTypesEnum = "SSHFP" - DNSRecordTypesEnumTXT DNSRecordTypesEnum = "TXT" - DNSRecordTypesEnumVirtualMachine DNSRecordTypesEnum = "VirtualMachine" -) - -// Defines values for DNSZoneNotFoundEnum. -const ( - DnsZoneNotFound DNSZoneNotFoundEnum = "dns_zone_not_found" -) - -// Defines values for DNSZoneNotVerifiedEnum. -const ( - DnsZoneNotVerified DNSZoneNotVerifiedEnum = "dns_zone_not_verified" -) - -// Defines values for DataCenterNotFoundEnum. -const ( - DataCenterNotFound DataCenterNotFoundEnum = "data_center_not_found" -) - -// Defines values for DeletionRestrictedEnum. -const ( - DeletionRestrictedEnumDeletionRestricted DeletionRestrictedEnum = "deletion_restricted" -) - -// Defines values for DiskBackupPolicyNotFoundEnum. -const ( - DiskBackupPolicyNotFound DiskBackupPolicyNotFoundEnum = "disk_backup_policy_not_found" -) - -// Defines values for DiskNotFoundEnum. -const ( - DiskNotFound DiskNotFoundEnum = "disk_not_found" -) - -// Defines values for DiskStateEnum. -const ( - DiskStateEnumBuilding DiskStateEnum = "building" - DiskStateEnumBuilt DiskStateEnum = "built" - DiskStateEnumConfiguring DiskStateEnum = "configuring" - DiskStateEnumFailed DiskStateEnum = "failed" - DiskStateEnumFormatting DiskStateEnum = "formatting" - DiskStateEnumImporting DiskStateEnum = "importing" - DiskStateEnumInstalling DiskStateEnum = "installing" - DiskStateEnumNotBuilt DiskStateEnum = "not_built" - DiskStateEnumResizing DiskStateEnum = "resizing" - DiskStateEnumRestoring DiskStateEnum = "restoring" -) - -// Defines values for DiskTemplateNotFoundEnum. -const ( - DiskTemplateNotFound DiskTemplateNotFoundEnum = "disk_template_not_found" -) - -// Defines values for DiskTemplateVersionNotFoundEnum. -const ( - DiskTemplateVersionNotFound DiskTemplateVersionNotFoundEnum = "disk_template_version_not_found" -) - -// Defines values for FileStorageVolumeNotFoundEnum. -const ( - FileStorageVolumeNotFound FileStorageVolumeNotFoundEnum = "file_storage_volume_not_found" -) - -// Defines values for FileStorageVolumeStateEnum. -const ( - FileStorageVolumeStateEnumConfiguring FileStorageVolumeStateEnum = "configuring" - FileStorageVolumeStateEnumFailed FileStorageVolumeStateEnum = "failed" - FileStorageVolumeStateEnumPending FileStorageVolumeStateEnum = "pending" - FileStorageVolumeStateEnumReady FileStorageVolumeStateEnum = "ready" -) - -// Defines values for FlexibleResourcesUnavailableToOrganizationEnum. -const ( - FlexibleResourcesUnavailableToOrganization FlexibleResourcesUnavailableToOrganizationEnum = "flexible_resources_unavailable_to_organization" -) - -// Defines values for GPUTypeNotFoundEnum. -const ( - GpuTypeNotFound GPUTypeNotFoundEnum = "gpu_type_not_found" -) - -// Defines values for IPAddressNotFoundEnum. -const ( - IpAddressNotFound IPAddressNotFoundEnum = "ip_address_not_found" -) - -// Defines values for IPAddressVersionEnum. -const ( - Ipv4 IPAddressVersionEnum = "ipv4" - Ipv6 IPAddressVersionEnum = "ipv6" -) - -// Defines values for IPAlreadyAllocatedEnum. -const ( - IpAlreadyAllocated IPAlreadyAllocatedEnum = "ip_already_allocated" -) - -// Defines values for IdentityNotLinkedToWebSessionEnum. -const ( - IdentityNotLinkedToWebSession IdentityNotLinkedToWebSessionEnum = "identity_not_linked_to_web_session" -) - -// Defines values for InterfaceNotFoundEnum. -const ( - InterfaceNotFound InterfaceNotFoundEnum = "interface_not_found" -) - -// Defines values for InvalidAPITokenEnum. -const ( - InvalidApiToken InvalidAPITokenEnum = "invalid_api_token" -) - -// Defines values for InvalidIPEnum. -const ( - InvalidIp InvalidIPEnum = "invalid_ip" -) - -// Defines values for InvalidSpecXMLEnum. -const ( - InvalidSpecXml InvalidSpecXMLEnum = "invalid_spec_xml" -) - -// Defines values for InvalidTimestampEnum. -const ( - InvalidTimestamp InvalidTimestampEnum = "invalid_timestamp" -) - -// Defines values for IssuerEnum. -const ( - Custom IssuerEnum = "custom" - LetsEncrypt IssuerEnum = "lets_encrypt" - SelfSigned IssuerEnum = "self_signed" -) - -// Defines values for LoadBalancerNotFoundEnum. -const ( - LoadBalancerNotFound LoadBalancerNotFoundEnum = "load_balancer_not_found" -) - -// Defines values for LoadBalancerResourceTypesEnum. -const ( - Tags LoadBalancerResourceTypesEnum = "tags" - VirtualMachineGroups LoadBalancerResourceTypesEnum = "virtual_machine_groups" - VirtualMachines LoadBalancerResourceTypesEnum = "virtual_machines" -) - -// Defines values for LoadBalancerRuleAlgorithmEnum. -const ( - LeastConnections LoadBalancerRuleAlgorithmEnum = "least_connections" - RoundRobin LoadBalancerRuleAlgorithmEnum = "round_robin" - Sticky LoadBalancerRuleAlgorithmEnum = "sticky" -) - -// Defines values for LoadBalancerRuleCheckProtocolEnum. -const ( - LoadBalancerRuleCheckProtocolEnumHTTP LoadBalancerRuleCheckProtocolEnum = "HTTP" - LoadBalancerRuleCheckProtocolEnumTCP LoadBalancerRuleCheckProtocolEnum = "TCP" -) - -// Defines values for LoadBalancerRuleHTTPStatusesEnum. -const ( - N2 LoadBalancerRuleHTTPStatusesEnum = "2" - N23 LoadBalancerRuleHTTPStatusesEnum = "23" - N234 LoadBalancerRuleHTTPStatusesEnum = "234" -) - -// Defines values for LoadBalancerRuleNotFoundEnum. -const ( - LoadBalancerRuleNotFound LoadBalancerRuleNotFoundEnum = "load_balancer_rule_not_found" -) - -// Defines values for LoadBalancerRuleProtocolEnum. -const ( - LoadBalancerRuleProtocolEnumHTTP LoadBalancerRuleProtocolEnum = "HTTP" - LoadBalancerRuleProtocolEnumHTTPS LoadBalancerRuleProtocolEnum = "HTTPS" - LoadBalancerRuleProtocolEnumTCP LoadBalancerRuleProtocolEnum = "TCP" -) - -// Defines values for LocationRequiredEnum. -const ( - LocationRequired LocationRequiredEnum = "location_required" -) - -// Defines values for MissingAPITokenEnum. -const ( - MissingApiToken MissingAPITokenEnum = "missing_api_token" -) - -// Defines values for NetworkNotFoundEnum. -const ( - NetworkNotFound NetworkNotFoundEnum = "network_not_found" -) - -// Defines values for NetworkSpeedProfileNotFoundEnum. -const ( - NetworkSpeedProfileNotFound NetworkSpeedProfileNotFoundEnum = "network_speed_profile_not_found" -) - -// Defines values for NoAllocationEnum. -const ( - NoAllocation NoAllocationEnum = "no_allocation" -) - -// Defines values for NoAvailableAddressesEnum. -const ( - NoAvailableAddresses NoAvailableAddressesEnum = "no_available_addresses" -) - -// Defines values for NoInterfaceAvailableEnum. -const ( - NoInterfaceAvailable NoInterfaceAvailableEnum = "no_interface_available" -) - -// Defines values for NoUserAssociatedWithIdentityEnum. -const ( - NoUserAssociatedWithIdentity NoUserAssociatedWithIdentityEnum = "no_user_associated_with_identity" -) - -// Defines values for ObjectInTrashEnum. -const ( - ObjectInTrashEnumObjectInTrash ObjectInTrashEnum = "object_in_trash" -) - -// Defines values for OperatingSystemNotFoundEnum. -const ( - OperatingSystemNotFound OperatingSystemNotFoundEnum = "operating_system_not_found" -) - -// Defines values for OrganizationLimitReachedEnum. -const ( - OrganizationLimitReached OrganizationLimitReachedEnum = "organization_limit_reached" -) - -// Defines values for OrganizationNotActivatedEnum. -const ( - OrganizationNotActivated OrganizationNotActivatedEnum = "organization_not_activated" -) - -// Defines values for OrganizationNotFoundEnum. -const ( - OrganizationNotFound OrganizationNotFoundEnum = "organization_not_found" -) - -// Defines values for OrganizationSuspendedEnum. -const ( - OrganizationSuspended OrganizationSuspendedEnum = "organization_suspended" -) - -// Defines values for PermissionDeniedEnum. -const ( - PermissionDeniedEnumPermissionDenied PermissionDeniedEnum = "permission_denied" -) - -// Defines values for PrivacyTypesEnum. -const ( - Private PrivacyTypesEnum = "private" - Public PrivacyTypesEnum = "public" -) - -// Defines values for RateLimitReachedEnum. -const ( - RateLimitReachedEnumRateLimitReached RateLimitReachedEnum = "rate_limit_reached" -) - -// Defines values for ResourceCreationRestrictedEnum. -const ( - ResourceCreationRestrictedEnumResourceCreationRestricted ResourceCreationRestrictedEnum = "resource_creation_restricted" -) - -// Defines values for ResourceDoesNotSupportUnallocationEnum. -const ( - ResourceDoesNotSupportUnallocation ResourceDoesNotSupportUnallocationEnum = "resource_does_not_support_unallocation" -) - -// Defines values for SSHKeyNotFoundEnum. -const ( - SshKeyNotFound SSHKeyNotFoundEnum = "ssh_key_not_found" -) - -// Defines values for ScheduleIntervalTypeEnum. -const ( - Daily ScheduleIntervalTypeEnum = "daily" - Hourly ScheduleIntervalTypeEnum = "hourly" - Monthly ScheduleIntervalTypeEnum = "monthly" - Weekly ScheduleIntervalTypeEnum = "weekly" -) - -// Defines values for ScopeNotGrantedErrorEnum. -const ( - ScopeNotGranted ScopeNotGrantedErrorEnum = "scope_not_granted" -) - -// Defines values for SecurityGroupNotFoundEnum. -const ( - SecurityGroupNotFound SecurityGroupNotFoundEnum = "security_group_not_found" -) - -// Defines values for SecurityGroupRuleActionEnum. -const ( - Allow SecurityGroupRuleActionEnum = "allow" - Deny SecurityGroupRuleActionEnum = "deny" -) - -// Defines values for SecurityGroupRuleDirectionEnum. -const ( - Inbound SecurityGroupRuleDirectionEnum = "inbound" - Outbound SecurityGroupRuleDirectionEnum = "outbound" -) - -// Defines values for SecurityGroupRuleNotFoundEnum. -const ( - SecurityGroupRuleNotFound SecurityGroupRuleNotFoundEnum = "security_group_rule_not_found" -) - -// Defines values for SecurityGroupRuleProtocolEnum. -const ( - ICMP SecurityGroupRuleProtocolEnum = "ICMP" - TCP SecurityGroupRuleProtocolEnum = "TCP" - UDP SecurityGroupRuleProtocolEnum = "UDP" -) - -// Defines values for SpeedProfileAlreadyAssignedEnum. -const ( - SpeedProfileAlreadyAssigned SpeedProfileAlreadyAssignedEnum = "speed_profile_already_assigned" -) - -// Defines values for StorageSpeedEnum. -const ( - Nvme StorageSpeedEnum = "nvme" - Ssd StorageSpeedEnum = "ssd" -) - -// Defines values for TagColorsEnum. -const ( - Aqua TagColorsEnum = "aqua" - Black TagColorsEnum = "black" - Brown TagColorsEnum = "brown" - DarkBlue TagColorsEnum = "dark_blue" - DarkGray TagColorsEnum = "dark_gray" - Green TagColorsEnum = "green" - LightBlue TagColorsEnum = "light_blue" - LightBrown TagColorsEnum = "light_brown" - LightGray TagColorsEnum = "light_gray" - Orange TagColorsEnum = "orange" - OrangeRed TagColorsEnum = "orange_red" - PastelAqua TagColorsEnum = "pastel_aqua" - PastelBlack TagColorsEnum = "pastel_black" - PastelBrown TagColorsEnum = "pastel_brown" - PastelDarkBlue TagColorsEnum = "pastel_dark_blue" - PastelDarkGray TagColorsEnum = "pastel_dark_gray" - PastelGreen TagColorsEnum = "pastel_green" - PastelLightBlue TagColorsEnum = "pastel_light_blue" - PastelLightBrown TagColorsEnum = "pastel_light_brown" - PastelLightGray TagColorsEnum = "pastel_light_gray" - PastelOrange TagColorsEnum = "pastel_orange" - PastelOrangeRed TagColorsEnum = "pastel_orange_red" - PastelPink TagColorsEnum = "pastel_pink" - PastelPurple TagColorsEnum = "pastel_purple" - PastelRed TagColorsEnum = "pastel_red" - PastelTeal TagColorsEnum = "pastel_teal" - PastelYellow TagColorsEnum = "pastel_yellow" - Pink TagColorsEnum = "pink" - Purple TagColorsEnum = "purple" - Red TagColorsEnum = "red" - Teal TagColorsEnum = "teal" - Yellow TagColorsEnum = "yellow" -) - -// Defines values for TagNotFoundEnum. -const ( - TagNotFound TagNotFoundEnum = "tag_not_found" -) - -// Defines values for TaskNotFoundEnum. -const ( - TaskNotFound TaskNotFoundEnum = "task_not_found" -) - -// Defines values for TaskQueueingErrorEnum. -const ( - TaskQueueingErrorEnumTaskQueueingError TaskQueueingErrorEnum = "task_queueing_error" -) - -// Defines values for TaskStatusEnum. -const ( - TaskStatusEnumCompleted TaskStatusEnum = "completed" - TaskStatusEnumFailed TaskStatusEnum = "failed" - TaskStatusEnumPending TaskStatusEnum = "pending" - TaskStatusEnumRunning TaskStatusEnum = "running" -) - -// Defines values for TemplateSpecFieldTypeEnum. -const ( - Boolean TemplateSpecFieldTypeEnum = "Boolean" - Keyboard TemplateSpecFieldTypeEnum = "Keyboard" - Password TemplateSpecFieldTypeEnum = "Password" - Text TemplateSpecFieldTypeEnum = "Text" -) - -// Defines values for TrashObjectNotFoundEnum. -const ( - TrashObjectNotFound TrashObjectNotFoundEnum = "trash_object_not_found" -) - -// Defines values for UnauthorizedNetworkForAPITokenEnum. -const ( - UnauthorizedNetworkForApiToken UnauthorizedNetworkForAPITokenEnum = "unauthorized_network_for_api_token" -) - -// Defines values for ValidationErrorEnum. -const ( - ValidationErrorEnumValidationError ValidationErrorEnum = "validation_error" -) - -// Defines values for VirtualMachineBuildNotFoundEnum. -const ( - BuildNotFound VirtualMachineBuildNotFoundEnum = "build_not_found" -) - -// Defines values for VirtualMachineBuildStateEnum. -const ( - VirtualMachineBuildStateEnumBuilding VirtualMachineBuildStateEnum = "building" - VirtualMachineBuildStateEnumComplete VirtualMachineBuildStateEnum = "complete" - VirtualMachineBuildStateEnumDraft VirtualMachineBuildStateEnum = "draft" - VirtualMachineBuildStateEnumFailed VirtualMachineBuildStateEnum = "failed" - VirtualMachineBuildStateEnumPending VirtualMachineBuildStateEnum = "pending" -) - -// Defines values for VirtualMachineDiskAttachmentStateEnum. -const ( - VirtualMachineDiskAttachmentStateEnumAttached VirtualMachineDiskAttachmentStateEnum = "attached" - VirtualMachineDiskAttachmentStateEnumAttaching VirtualMachineDiskAttachmentStateEnum = "attaching" - VirtualMachineDiskAttachmentStateEnumDetached VirtualMachineDiskAttachmentStateEnum = "detached" - VirtualMachineDiskAttachmentStateEnumDetaching VirtualMachineDiskAttachmentStateEnum = "detaching" - VirtualMachineDiskAttachmentStateEnumFailed VirtualMachineDiskAttachmentStateEnum = "failed" -) - -// Defines values for VirtualMachineGPUPendingActionEnum. -const ( - Attach VirtualMachineGPUPendingActionEnum = "attach" - Detach VirtualMachineGPUPendingActionEnum = "detach" -) - -// Defines values for VirtualMachineGPUStatusEnum. -const ( - Attached VirtualMachineGPUStatusEnum = "attached" - Attaching VirtualMachineGPUStatusEnum = "attaching" - Detached VirtualMachineGPUStatusEnum = "detached" - Detaching VirtualMachineGPUStatusEnum = "detaching" - Unknown VirtualMachineGPUStatusEnum = "unknown" -) - -// Defines values for VirtualMachineGroupNotFoundEnum. -const ( - VirtualMachineGroupNotFound VirtualMachineGroupNotFoundEnum = "virtual_machine_group_not_found" -) - -// Defines values for VirtualMachineMustBeStartedEnum. -const ( - VirtualMachineMustBeStartedEnumVirtualMachineMustBeStarted VirtualMachineMustBeStartedEnum = "virtual_machine_must_be_started" -) - -// Defines values for VirtualMachineNetworkInterfaceNotFoundEnum. -const ( - VirtualMachineNetworkInterfaceNotFound VirtualMachineNetworkInterfaceNotFoundEnum = "virtual_machine_network_interface_not_found" -) - -// Defines values for VirtualMachineNotFoundEnum. -const ( - VirtualMachineNotFound VirtualMachineNotFoundEnum = "virtual_machine_not_found" -) - -// Defines values for VirtualMachinePackageNotFoundEnum. -const ( - PackageNotFound VirtualMachinePackageNotFoundEnum = "package_not_found" -) - -// Defines values for VirtualMachineStateEnum. -const ( - Allocated VirtualMachineStateEnum = "allocated" - Allocating VirtualMachineStateEnum = "allocating" - Failed VirtualMachineStateEnum = "failed" - Migrating VirtualMachineStateEnum = "migrating" - Orphaned VirtualMachineStateEnum = "orphaned" - Resetting VirtualMachineStateEnum = "resetting" - ShuttingDown VirtualMachineStateEnum = "shutting_down" - Started VirtualMachineStateEnum = "started" - Starting VirtualMachineStateEnum = "starting" - Stopped VirtualMachineStateEnum = "stopped" - Stopping VirtualMachineStateEnum = "stopping" -) - -// Defines values for ZoneNotFoundEnum. -const ( - ZoneNotFound ZoneNotFoundEnum = "zone_not_found" -) - -// APIAuthenticator400Schema No API token was provided in the Authorization header. Ensure a token is provided prefixed with Bearer -type APIAuthenticator400Schema struct { - Code *MissingAPITokenEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// Attachment defines model for Attachment. -type Attachment struct { - Digest *string `json:"digest,omitempty"` - FileName *string `json:"file_name,omitempty"` - FileSize *int `json:"file_size,omitempty"` - FileType *string `json:"file_type,omitempty"` - Token *string `json:"token,omitempty"` - Url *string `json:"url,omitempty"` -} - -// AuthSSHKey defines model for AuthSSHKey. -type AuthSSHKey struct { - Fingerprint *string `json:"fingerprint,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// AuthSSHKeyLookup All 'ssh_key[]' params are mutually exclusive, only one can be provided. -type AuthSSHKeyLookup struct { - Id *string `json:"id,omitempty"` -} - -// AuthSSHKeyProperties All 'ssh_key[]' params are mutually exclusive, only one can be provided. -type AuthSSHKeyProperties struct { - Key *string `json:"key,omitempty"` - Name *string `json:"name,omitempty"` -} - -// Certificate defines model for Certificate. -type Certificate struct { - AdditionalNames *[]string `json:"additional_names,omitempty"` - AuthorizationMethod *string `json:"authorization_method"` - Certificate *string `json:"certificate"` - - // CertificateApiUrl This is the URL that can be used to access this certificate's details. through the certificate API (a different API to this one). If null, this means that it is no longer available. If that is the case, you can get a new URL by resetting the API token for this certificate. - CertificateApiUrl *string `json:"certificate_api_url"` - Chain *string `json:"chain"` - CreatedAt *int `json:"created_at,omitempty"` - ExpiresAt *int `json:"expires_at"` - Id *string `json:"id,omitempty"` - IssueError *string `json:"issue_error"` - Issuer *IssuerEnum `json:"issuer,omitempty"` - LastIssuedAt *int `json:"last_issued_at"` - Name *string `json:"name,omitempty"` - PrivateKey *string `json:"private_key"` - State *CertificateStateEnum `json:"state,omitempty"` -} - -// CertificateLookup All 'certificates[]' params are mutually exclusive, only one can be provided. -type CertificateLookup struct { - Id *string `json:"id,omitempty"` -} - -// CertificateNotFoundEnum defines model for CertificateNotFoundEnum. -type CertificateNotFoundEnum string - -// CertificateStateEnum defines model for CertificateStateEnum. -type CertificateStateEnum string - -// Country defines model for Country. -type Country struct { - Eu *bool `json:"eu,omitempty"` - Id *string `json:"id,omitempty"` - IsoCode2 *string `json:"iso_code2,omitempty"` - IsoCode3 *string `json:"iso_code3,omitempty"` - Name *string `json:"name,omitempty"` - TimeZone *string `json:"time_zone"` -} - -// CountryNotFoundEnum defines model for CountryNotFoundEnum. -type CountryNotFoundEnum string - -// CountryState defines model for CountryState. -type CountryState struct { - Code *string `json:"code,omitempty"` - Country *Country `json:"country,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// CountryStateNotFoundEnum defines model for CountryStateNotFoundEnum. -type CountryStateNotFoundEnum string - -// Currency defines model for Currency. -type Currency struct { - Id *string `json:"id,omitempty"` - IsoCode *string `json:"iso_code,omitempty"` - Name *string `json:"name,omitempty"` - Symbol *string `json:"symbol,omitempty"` -} - -// CurrencyNotFoundEnum defines model for CurrencyNotFoundEnum. -type CurrencyNotFoundEnum string - -// DNSRecord defines model for DNSRecord. -type DNSRecord struct { - Content *string `json:"content,omitempty"` - ContentAttributes *DNSRecordContentAttributes `json:"content_attributes,omitempty"` - FullName *string `json:"full_name,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name"` - Priority *int `json:"priority"` - Ttl *int `json:"ttl"` - Type *DNSRecordTypesEnum `json:"type,omitempty"` -} - -// DNSRecordArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type DNSRecordArguments struct { - // Content All 'content[]' params are mutually exclusive, only one can be provided. - Content *DNSRecordContentArguments `json:"content,omitempty"` - - // Name The name of the record - Name *string `json:"name,omitempty"` - Priority *int `json:"priority,omitempty"` - Ttl *int `json:"ttl,omitempty"` - Type *DNSRecordTypesEnum `json:"type,omitempty"` -} - -// DNSRecordContentArguments All 'content[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArguments struct { - // A All 'A[]' params are mutually exclusive, only one can be provided. - A *DNSRecordContentArgumentsForA `json:"A,omitempty"` - - // AAAA All 'AAAA[]' params are mutually exclusive, only one can be provided. - AAAA *DNSRecordContentArgumentsForAAAA `json:"AAAA,omitempty"` - - // ALIAS All 'ALIAS[]' params are mutually exclusive, only one can be provided. - ALIAS *DNSRecordContentArgumentsForALIAS `json:"ALIAS,omitempty"` - - // CAA All 'CAA[]' params are mutually exclusive, only one can be provided. - CAA *DNSRecordContentArgumentsForCAA `json:"CAA,omitempty"` - - // CNAME All 'CNAME[]' params are mutually exclusive, only one can be provided. - CNAME *DNSRecordContentArgumentsForCNAME `json:"CNAME,omitempty"` - - // IPS All 'IPS[]' params are mutually exclusive, only one can be provided. - IPS *DNSRecordContentArgumentsForIPS `json:"IPS,omitempty"` - - // MX All 'MX[]' params are mutually exclusive, only one can be provided. - MX *DNSRecordContentArgumentsForMX `json:"MX,omitempty"` - - // NS All 'NS[]' params are mutually exclusive, only one can be provided. - NS *DNSRecordContentArgumentsForNS `json:"NS,omitempty"` - - // PTR All 'PTR[]' params are mutually exclusive, only one can be provided. - PTR *DNSRecordContentArgumentsForPTR `json:"PTR,omitempty"` - - // SOA All 'SOA[]' params are mutually exclusive, only one can be provided. - SOA *DNSRecordContentArgumentsForSOA `json:"SOA,omitempty"` - - // SRV All 'SRV[]' params are mutually exclusive, only one can be provided. - SRV *DNSRecordContentArgumentsForSRV `json:"SRV,omitempty"` - - // SSHFP All 'SSHFP[]' params are mutually exclusive, only one can be provided. - SSHFP *DNSRecordContentArgumentsForSSHFP `json:"SSHFP,omitempty"` - - // TXT All 'TXT[]' params are mutually exclusive, only one can be provided. - TXT *DNSRecordContentArgumentsForTXT `json:"TXT,omitempty"` - - // VirtualMachine All 'VirtualMachine[]' params are mutually exclusive, only one can be provided. - VirtualMachine *DNSRecordContentArgumentsForVirtualMachine `json:"VirtualMachine,omitempty"` -} - -// DNSRecordContentArgumentsForA All 'A[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForA struct { - IpAddress *string `json:"ip_address,omitempty"` -} - -// DNSRecordContentArgumentsForAAAA All 'AAAA[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForAAAA struct { - IpAddress *string `json:"ip_address,omitempty"` -} - -// DNSRecordContentArgumentsForALIAS All 'ALIAS[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForALIAS struct { - Hostname *string `json:"hostname,omitempty"` -} - -// DNSRecordContentArgumentsForCAA All 'CAA[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForCAA struct { - Flag *string `json:"flag,omitempty"` - Tag *string `json:"tag,omitempty"` - Value *string `json:"value,omitempty"` -} - -// DNSRecordContentArgumentsForCNAME All 'CNAME[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForCNAME struct { - Hostname *string `json:"hostname,omitempty"` -} - -// DNSRecordContentArgumentsForIPS All 'IPS[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForIPS struct { - IpAddresses *string `json:"ip_addresses,omitempty"` -} - -// DNSRecordContentArgumentsForMX All 'MX[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForMX struct { - Hostname *string `json:"hostname,omitempty"` -} - -// DNSRecordContentArgumentsForNS All 'NS[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForNS struct { - Hostname *string `json:"hostname,omitempty"` -} - -// DNSRecordContentArgumentsForPTR All 'PTR[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForPTR struct { - Hostname *string `json:"hostname,omitempty"` -} - -// DNSRecordContentArgumentsForSOA All 'SOA[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForSOA = interface{} - -// DNSRecordContentArgumentsForSRV All 'SRV[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForSRV struct { - Port *string `json:"port,omitempty"` - Target *string `json:"target,omitempty"` - Weight *string `json:"weight,omitempty"` -} - -// DNSRecordContentArgumentsForSSHFP All 'SSHFP[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForSSHFP struct { - Algorithm *string `json:"algorithm,omitempty"` - Fingerprint *string `json:"fingerprint,omitempty"` - FingerprintType *string `json:"fingerprint_type,omitempty"` -} - -// DNSRecordContentArgumentsForTXT All 'TXT[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForTXT struct { - Content *string `json:"content,omitempty"` -} - -// DNSRecordContentArgumentsForVirtualMachine All 'VirtualMachine[]' params are mutually exclusive, only one can be provided. -type DNSRecordContentArgumentsForVirtualMachine struct { - VirtualMachine *string `json:"virtual_machine,omitempty"` -} - -// DNSRecordContentAttributes defines model for DNSRecordContentAttributes. -type DNSRecordContentAttributes struct { - A *RecordContentAttributesForA `json:"A"` - AAAA *RecordContentAttributesForAAAA `json:"AAAA"` - ALIAS *RecordContentAttributesForALIAS `json:"ALIAS"` - CAA *RecordContentAttributesForCAA `json:"CAA"` - CNAME *RecordContentAttributesForCNAME `json:"CNAME"` - IPS *RecordContentAttributesForIPS `json:"IPS"` - MX *RecordContentAttributesForMX `json:"MX"` - NS *RecordContentAttributesForNS `json:"NS"` - PTR *RecordContentAttributesForPTR `json:"PTR"` - SOA *map[string]interface{} `json:"SOA"` - SRV *RecordContentAttributesForSRV `json:"SRV"` - SSHFP *RecordContentAttributesForSSHFP `json:"SSHFP"` - TXT *RecordContentAttributesForTXT `json:"TXT"` - VirtualMachine *RecordContentAttributesForVirtualMachine `json:"VirtualMachine"` -} - -// DNSRecordLookup All 'dns_record[]' params are mutually exclusive, only one can be provided. -type DNSRecordLookup struct { - Id *string `json:"id,omitempty"` -} - -// DNSRecordNotFoundEnum defines model for DNSRecordNotFoundEnum. -type DNSRecordNotFoundEnum string - -// DNSRecordTypesEnum defines model for DNSRecordTypesEnum. -type DNSRecordTypesEnum string - -// DNSZone defines model for DNSZone. -type DNSZone struct { - DefaultTtl *int `json:"default_ttl,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Verified *bool `json:"verified,omitempty"` -} - -// DNSZoneArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type DNSZoneArguments struct { - DefaultTtl *int `json:"default_ttl,omitempty"` - - // Name The name of the zone (only available for creation) - Name *string `json:"name,omitempty"` -} - -// DNSZoneLookup All 'dns_zone[]' params are mutually exclusive, only one can be provided. -type DNSZoneLookup struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// DNSZoneNotFoundEnum defines model for DNSZoneNotFoundEnum. -type DNSZoneNotFoundEnum string - -// DNSZoneNotVerifiedEnum defines model for DNSZoneNotVerifiedEnum. -type DNSZoneNotVerifiedEnum string - -// DataCenter defines model for DataCenter. -type DataCenter struct { - Country *Country `json:"country,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// DataCenterLookup All 'data_center[]' params are mutually exclusive, only one can be provided. -type DataCenterLookup struct { - Id *string `json:"id,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// DataCenterNotFoundEnum defines model for DataCenterNotFoundEnum. -type DataCenterNotFoundEnum string - -// DataCenterNotFoundSchema No data center was found matching any of the criteria provided in the arguments -type DataCenterNotFoundSchema struct { - Code *DataCenterNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DeleteDiskBackupPolicy200ResponseDiskBackupPolicy defines model for DeleteDiskBackupPolicy200ResponseDiskBackupPolicy. -type DeleteDiskBackupPolicy200ResponseDiskBackupPolicy struct { - Id *string `json:"id,omitempty"` -} - -// DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy defines model for DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy. -type DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy struct { - AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` - Id *string `json:"id,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` -} - -// DeleteFileStorageVolume200ResponseFileStorageVolume defines model for DeleteFileStorageVolume200ResponseFileStorageVolume. -type DeleteFileStorageVolume200ResponseFileStorageVolume struct { - Associations *[]string `json:"associations,omitempty"` - DataCenter *DeleteFileStorageVolumePartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - - // NfsLocation The NFS location of where to mount the volume from. - NfsLocation *string `json:"nfs_location"` - - // Size The size of the volume in bytes. - Size *int `json:"size"` - State *FileStorageVolumeStateEnum `json:"state,omitempty"` -} - -// DeleteFileStorageVolumePartDataCenter defines model for DeleteFileStorageVolumePartDataCenter. -type DeleteFileStorageVolumePartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// DeleteLoadBalancer200ResponseLoadBalancer defines model for DeleteLoadBalancer200ResponseLoadBalancer. -type DeleteLoadBalancer200ResponseLoadBalancer struct { - ApiReference *string `json:"api_reference"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule defines model for DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule. -type DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule struct { - Id *string `json:"id,omitempty"` -} - -// DeleteSecurityGroup200ResponseSecurityGroup defines model for DeleteSecurityGroup200ResponseSecurityGroup. -type DeleteSecurityGroup200ResponseSecurityGroup struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule defines model for DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule. -type DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule struct { - Id *string `json:"id,omitempty"` -} - -// DeleteVirtualMachine200ResponseVirtualMachine defines model for DeleteVirtualMachine200ResponseVirtualMachine. -type DeleteVirtualMachine200ResponseVirtualMachine struct { - AttachedIso *ISO `json:"attached_iso"` - CpuCores *int `json:"cpu_cores"` - CreatedAt *int `json:"created_at,omitempty"` - Description *string `json:"description"` - Fqdn *string `json:"fqdn,omitempty"` - GpuType *DeleteVirtualMachinePartGPUType `json:"gpu_type"` - Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` - Group *VirtualMachineGroup `json:"group"` - Hostname *string `json:"hostname,omitempty"` - Id *string `json:"id,omitempty"` - InitialRootPassword *string `json:"initial_root_password"` - IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` - MemoryInGb *int `json:"memory_in_gb"` - Name *string `json:"name,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Package *VirtualMachinePackage `json:"package"` - State *VirtualMachineStateEnum `json:"state,omitempty"` - TagNames *[]string `json:"tag_names,omitempty"` - Tags *[]Tag `json:"tags,omitempty"` - UseDedicatedCpus *bool `json:"use_dedicated_cpus"` - Zone *Zone `json:"zone,omitempty"` -} - -// DeleteVirtualMachinePartGPUType defines model for DeleteVirtualMachinePartGPUType. -type DeleteVirtualMachinePartGPUType struct { - Id *string `json:"id,omitempty"` - Manufacturer *string `json:"manufacturer,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MemoryType *string `json:"memory_type,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// DeletionRestricted defines model for DeletionRestricted. -type DeletionRestricted struct { - Errors *[]string `json:"errors,omitempty"` -} - -// DeletionRestrictedEnum defines model for DeletionRestrictedEnum. -type DeletionRestrictedEnum string - -// Disk defines model for Disk. -type Disk struct { - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - Installation *DiskInstallation `json:"installation"` - IoProfile *DiskIOProfile `json:"io_profile"` - Name *string `json:"name,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - State *DiskStateEnum `json:"state,omitempty"` - StorageSpeed *StorageSpeedEnum `json:"storage_speed,omitempty"` - VirtualMachineDisk *VirtualMachineDisk `json:"virtual_machine_disk"` - Wwn *string `json:"wwn,omitempty"` -} - -// DiskBackupPolicyArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type DiskBackupPolicyArguments struct { - Retention *int `json:"retention,omitempty"` - - // Schedule All 'schedule[]' params are mutually exclusive, only one can be provided. - Schedule *ScheduleArguments `json:"schedule,omitempty"` -} - -// DiskBackupPolicyLookup All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. -type DiskBackupPolicyLookup struct { - Id *string `json:"id,omitempty"` -} - -// DiskBackupPolicyNotFoundEnum defines model for DiskBackupPolicyNotFoundEnum. -type DiskBackupPolicyNotFoundEnum string - -// DiskBackupPolicyTarget defines model for DiskBackupPolicyTarget. -type DiskBackupPolicyTarget struct { - Target *DiskBackupPolicyTarget_Target `json:"target,omitempty"` -} - -// DiskBackupPolicyTarget_Target defines model for DiskBackupPolicyTarget.Target. -type DiskBackupPolicyTarget_Target struct { - union json.RawMessage -} - -// DiskIOProfile defines model for DiskIOProfile. -type DiskIOProfile struct { - Id *string `json:"id,omitempty"` - Iops *int `json:"iops"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` - SpeedInMb *int `json:"speed_in_mb"` -} - -// DiskInstallation defines model for DiskInstallation. -type DiskInstallation struct { - Attributes *[]DiskInstallationAttribute `json:"attributes,omitempty"` - DiskTemplateVersion *DiskTemplateVersion `json:"disk_template_version,omitempty"` - Id *string `json:"id,omitempty"` -} - -// DiskInstallationAttribute defines model for DiskInstallationAttribute. -type DiskInstallationAttribute struct { - Description *string `json:"description"` - Key *string `json:"key,omitempty"` - Label *string `json:"label,omitempty"` - Protect *bool `json:"protect,omitempty"` - Value *string `json:"value"` -} - -// DiskLookup All 'disk[]' params are mutually exclusive, only one can be provided. -type DiskLookup struct { - Id *string `json:"id,omitempty"` -} - -// DiskNotFoundEnum defines model for DiskNotFoundEnum. -type DiskNotFoundEnum string - -// DiskStateEnum defines model for DiskStateEnum. -type DiskStateEnum string - -// DiskTemplate defines model for DiskTemplate. -type DiskTemplate struct { - Description *string `json:"description"` - Id *string `json:"id,omitempty"` - LatestVersion *DiskTemplateVersion `json:"latest_version"` - Name *string `json:"name,omitempty"` - OperatingSystem *OperatingSystem `json:"operating_system"` - Permalink *string `json:"permalink,omitempty"` - Universal *bool `json:"universal,omitempty"` -} - -// DiskTemplateLookup All 'disk_template[]' params are mutually exclusive, only one can be provided. -type DiskTemplateLookup struct { - Id *string `json:"id,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// DiskTemplateNotFoundEnum defines model for DiskTemplateNotFoundEnum. -type DiskTemplateNotFoundEnum string - -// DiskTemplateNotFoundSchema No disk template was found matching any of the criteria provided in the arguments -type DiskTemplateNotFoundSchema struct { - Code *DiskTemplateNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DiskTemplateVersion defines model for DiskTemplateVersion. -type DiskTemplateVersion struct { - DiskTemplate *DiskTemplate `json:"disk_template,omitempty"` - Id *string `json:"id,omitempty"` - Number *int `json:"number,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - Stable *bool `json:"stable,omitempty"` -} - -// DiskTemplateVersionNotFoundEnum defines model for DiskTemplateVersionNotFoundEnum. -type DiskTemplateVersionNotFoundEnum string - -// FileStorageVolumeArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type FileStorageVolumeArguments struct { - Associations *[]string `json:"associations,omitempty"` - - // DataCenter All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenter *DataCenterLookup `json:"data_center,omitempty"` - - // Name Unique name to help identify the volume. - Name *string `json:"name,omitempty"` -} - -// FileStorageVolumeLookup All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. -type FileStorageVolumeLookup struct { - Id *string `json:"id,omitempty"` -} - -// FileStorageVolumeNotFoundEnum defines model for FileStorageVolumeNotFoundEnum. -type FileStorageVolumeNotFoundEnum string - -// FileStorageVolumeStateEnum defines model for FileStorageVolumeStateEnum. -type FileStorageVolumeStateEnum string - -// FlexibleResourcesUnavailableToOrganizationEnum defines model for FlexibleResourcesUnavailableToOrganizationEnum. -type FlexibleResourcesUnavailableToOrganizationEnum string - -// FlexibleResourcesUnavailableToOrganizationSchema The organization is not permitted to use flexible resources -type FlexibleResourcesUnavailableToOrganizationSchema struct { - Code *FlexibleResourcesUnavailableToOrganizationEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// GPUType defines model for GPUType. -type GPUType struct { - DataCenters *[]DataCenter `json:"data_centers,omitempty"` - Id *string `json:"id,omitempty"` - Manufacturer *string `json:"manufacturer,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MemoryType *string `json:"memory_type,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GPUTypeLookup All 'gpu_type[]' params are mutually exclusive, only one can be provided. -type GPUTypeLookup struct { - Id *string `json:"id,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GPUTypeNotFoundEnum defines model for GPUTypeNotFoundEnum. -type GPUTypeNotFoundEnum string - -// GetCountries200ResponseCountries defines model for GetCountries200ResponseCountries. -type GetCountries200ResponseCountries struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetCountryCountryStates200ResponseCountryStates defines model for GetCountryCountryStates200ResponseCountryStates. -type GetCountryCountryStates200ResponseCountryStates struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetCurrencies200ResponseCurrencies defines model for GetCurrencies200ResponseCurrencies. -type GetCurrencies200ResponseCurrencies struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetDataCenter200ResponseDataCenter defines model for GetDataCenter200ResponseDataCenter. -type GetDataCenter200ResponseDataCenter struct { - Country *GetDataCenterPartCountry `json:"country,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetDataCenterDefaultNetwork200ResponseNetwork defines model for GetDataCenterDefaultNetwork200ResponseNetwork. -type GetDataCenterDefaultNetwork200ResponseNetwork struct { - DataCenter *GetDataCenterDefaultNetworkPartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetDataCenterDefaultNetworkPartDataCenter defines model for GetDataCenterDefaultNetworkPartDataCenter. -type GetDataCenterDefaultNetworkPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetDataCenterGPUTypes200ResponseGPUTypes defines model for GetDataCenterGPUTypes200ResponseGPUTypes. -type GetDataCenterGPUTypes200ResponseGPUTypes struct { - Id *string `json:"id,omitempty"` - Manufacturer *string `json:"manufacturer,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MemoryType *string `json:"memory_type,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetDataCenterPartCountry defines model for GetDataCenterPartCountry. -type GetDataCenterPartCountry struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetDataCenters200ResponseDataCenters defines model for GetDataCenters200ResponseDataCenters. -type GetDataCenters200ResponseDataCenters struct { - Country *GetDataCentersPartCountry `json:"country,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetDataCentersPartCountry defines model for GetDataCentersPartCountry. -type GetDataCentersPartCountry struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetDisk200ResponseDisk defines model for GetDisk200ResponseDisk. -type GetDisk200ResponseDisk struct { - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - Installation *DiskInstallation `json:"installation"` - IoProfile *DiskIOProfile `json:"io_profile"` - Name *string `json:"name,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - State *DiskStateEnum `json:"state,omitempty"` - StorageSpeed *StorageSpeedEnum `json:"storage_speed,omitempty"` - VirtualMachineDisk *GetDiskPartVirtualMachineDisk `json:"virtual_machine_disk"` - Wwn *string `json:"wwn,omitempty"` -} - -// GetDiskBackupPolicy200ResponseDiskBackupPolicy defines model for GetDiskBackupPolicy200ResponseDiskBackupPolicy. -type GetDiskBackupPolicy200ResponseDiskBackupPolicy struct { - AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` - Id *string `json:"id,omitempty"` - Retention *int `json:"retention,omitempty"` - Schedule *Schedule `json:"schedule,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` - TotalSize *float32 `json:"total_size,omitempty"` -} - -// GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies defines model for GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies. -type GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies struct { - Id *string `json:"id,omitempty"` - Retention *int `json:"retention,omitempty"` - Schedule *GetDiskDiskBackupPoliciesPartSchedule `json:"schedule,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` - TotalSize *float32 `json:"total_size,omitempty"` -} - -// GetDiskDiskBackupPoliciesPartSchedule defines model for GetDiskDiskBackupPoliciesPartSchedule. -type GetDiskDiskBackupPoliciesPartSchedule struct { - Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` - NextInvocationAt *int `json:"next_invocation_at,omitempty"` -} - -// GetDiskPartVirtualMachine defines model for GetDiskPartVirtualMachine. -type GetDiskPartVirtualMachine struct { - Fqdn *string `json:"fqdn,omitempty"` - Id *string `json:"id,omitempty"` -} - -// GetDiskPartVirtualMachineDisk defines model for GetDiskPartVirtualMachineDisk. -type GetDiskPartVirtualMachineDisk struct { - AttachOnBoot *bool `json:"attach_on_boot,omitempty"` - Boot *bool `json:"boot,omitempty"` - State *VirtualMachineDiskAttachmentStateEnum `json:"state,omitempty"` - VirtualMachine *GetDiskPartVirtualMachine `json:"virtual_machine,omitempty"` -} - -// GetDiskTemplate200ResponseDiskTemplate defines model for GetDiskTemplate200ResponseDiskTemplate. -type GetDiskTemplate200ResponseDiskTemplate struct { - Description *string `json:"description"` - Id *string `json:"id,omitempty"` - LatestVersion *GetDiskTemplatePartLatestVersion `json:"latest_version"` - Name *string `json:"name,omitempty"` - OperatingSystem *OperatingSystem `json:"operating_system"` - Permalink *string `json:"permalink,omitempty"` - Universal *bool `json:"universal,omitempty"` -} - -// GetDiskTemplatePartLatestVersion defines model for GetDiskTemplatePartLatestVersion. -type GetDiskTemplatePartLatestVersion struct { - Id *string `json:"id,omitempty"` -} - -// GetDiskTemplateVersion200ResponseDiskTemplateVersion defines model for GetDiskTemplateVersion200ResponseDiskTemplateVersion. -type GetDiskTemplateVersion200ResponseDiskTemplateVersion struct { - DiskTemplate *GetDiskTemplateVersionPartDiskTemplate `json:"disk_template,omitempty"` - Id *string `json:"id,omitempty"` - Number *int `json:"number,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - Stable *bool `json:"stable,omitempty"` -} - -// GetDiskTemplateVersionPartDiskTemplate defines model for GetDiskTemplateVersionPartDiskTemplate. -type GetDiskTemplateVersionPartDiskTemplate struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion defines model for GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion. -type GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion struct { - DiskTemplate *GetDiskTemplateVersionSpecPartDiskTemplate `json:"disk_template,omitempty"` - Id *string `json:"id,omitempty"` - Number *int `json:"number,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - Stable *bool `json:"stable,omitempty"` -} - -// GetDiskTemplateVersionSpecPartDiskTemplate defines model for GetDiskTemplateVersionSpecPartDiskTemplate. -type GetDiskTemplateVersionSpecPartDiskTemplate struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetDiskTemplateVersions200ResponseDiskTemplate defines model for GetDiskTemplateVersions200ResponseDiskTemplate. -type GetDiskTemplateVersions200ResponseDiskTemplate struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetDiskTemplateVersions200ResponseDiskTemplateVersions defines model for GetDiskTemplateVersions200ResponseDiskTemplateVersions. -type GetDiskTemplateVersions200ResponseDiskTemplateVersions struct { - Id *string `json:"id,omitempty"` - Number *int `json:"number,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - Stable *bool `json:"stable,omitempty"` -} - -// GetFileStorageVolume200ResponseFileStorageVolume defines model for GetFileStorageVolume200ResponseFileStorageVolume. -type GetFileStorageVolume200ResponseFileStorageVolume struct { - Associations *[]string `json:"associations,omitempty"` - DataCenter *GetFileStorageVolumePartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - - // NfsLocation The NFS location of where to mount the volume from. - NfsLocation *string `json:"nfs_location"` - - // Size The size of the volume in bytes. - Size *int `json:"size"` - State *FileStorageVolumeStateEnum `json:"state,omitempty"` -} - -// GetFileStorageVolumePartDataCenter defines model for GetFileStorageVolumePartDataCenter. -type GetFileStorageVolumePartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetGPUType200ResponseGPUType defines model for GetGPUType200ResponseGPUType. -type GetGPUType200ResponseGPUType struct { - DataCenters *[]GetGPUTypePartDataCenters `json:"data_centers,omitempty"` - Id *string `json:"id,omitempty"` - Manufacturer *string `json:"manufacturer,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MemoryType *string `json:"memory_type,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetGPUTypePartDataCenters defines model for GetGPUTypePartDataCenters. -type GetGPUTypePartDataCenters struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetGPUTypes200ResponseGPUTypes defines model for GetGPUTypes200ResponseGPUTypes. -type GetGPUTypes200ResponseGPUTypes struct { - DataCenters *[]GetGPUTypesPartDataCenters `json:"data_centers,omitempty"` - Id *string `json:"id,omitempty"` - Manufacturer *string `json:"manufacturer,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MemoryType *string `json:"memory_type,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetGPUTypesPartDataCenters defines model for GetGPUTypesPartDataCenters. -type GetGPUTypesPartDataCenters struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetIPAddress200ResponseAllocation defines model for GetIPAddress200ResponseAllocation. -type GetIPAddress200ResponseAllocation struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetLoadBalancer200ResponseLoadBalancer defines model for GetLoadBalancer200ResponseLoadBalancer. -type GetLoadBalancer200ResponseLoadBalancer struct { - ApiReference *string `json:"api_reference"` - BackendCertificate *string `json:"backend_certificate,omitempty"` - BackendCertificateKey *string `json:"backend_certificate_key,omitempty"` - DataCenter *GetLoadBalancerPartDataCenter `json:"data_center,omitempty"` - EnableWeighting *bool `json:"enable_weighting,omitempty"` - HttpsRedirect *bool `json:"https_redirect,omitempty"` - Id *string `json:"id,omitempty"` - IpAddress *[]GetLoadBalancerPartIPAddress `json:"ip_address,omitempty"` - Name *string `json:"name,omitempty"` - ResourceIds *[]string `json:"resource_ids,omitempty"` - ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` - Resources *[]LoadBalancerResource `json:"resources,omitempty"` - StandbyVms *[]string `json:"standby_vms,omitempty"` - Weights *[]LoadBalancerWeight `json:"weights,omitempty"` -} - -// GetLoadBalancerPartDataCenter defines model for GetLoadBalancerPartDataCenter. -type GetLoadBalancerPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetLoadBalancerPartIPAddress defines model for GetLoadBalancerPartIPAddress. -type GetLoadBalancerPartIPAddress struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// GetLoadBalancerRules200ResponseLoadBalancerRules defines model for GetLoadBalancerRules200ResponseLoadBalancerRules. -type GetLoadBalancerRules200ResponseLoadBalancerRules struct { - Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` - Certificates *[]GetLoadBalancerRulesPartCertificates `json:"certificates,omitempty"` - CheckEnabled *bool `json:"check_enabled,omitempty"` - DestinationPort *int `json:"destination_port,omitempty"` - Id *string `json:"id,omitempty"` - ListenPort *int `json:"listen_port,omitempty"` - Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` -} - -// GetLoadBalancerRulesPartCertificates defines model for GetLoadBalancerRulesPartCertificates. -type GetLoadBalancerRulesPartCertificates struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule defines model for GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule. -type GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule struct { - Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` - BackendSsl *bool `json:"backend_ssl,omitempty"` - Certificates *[]GetLoadBalancersRulesLoadBalancerRulePartCertificates `json:"certificates,omitempty"` - CheckEnabled *bool `json:"check_enabled,omitempty"` - CheckFall *int `json:"check_fall,omitempty"` - CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses"` - CheckInterval *int `json:"check_interval,omitempty"` - CheckPath *string `json:"check_path,omitempty"` - CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol"` - CheckRise *int `json:"check_rise,omitempty"` - CheckTimeout *int `json:"check_timeout,omitempty"` - DestinationPort *int `json:"destination_port,omitempty"` - Id *string `json:"id,omitempty"` - ListenPort *int `json:"listen_port,omitempty"` - LoadBalancer *GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer `json:"load_balancer,omitempty"` - PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` - Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` - ProxyProtocol *bool `json:"proxy_protocol,omitempty"` -} - -// GetLoadBalancersRulesLoadBalancerRulePartCertificates defines model for GetLoadBalancersRulesLoadBalancerRulePartCertificates. -type GetLoadBalancersRulesLoadBalancerRulePartCertificates struct { - AdditionalNames *[]string `json:"additional_names,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - State *CertificateStateEnum `json:"state,omitempty"` -} - -// GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer defines model for GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer. -type GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetOperatingSystems200ResponseOperatingSystems defines model for GetOperatingSystems200ResponseOperatingSystems. -type GetOperatingSystems200ResponseOperatingSystems struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetOrganizationAvailableNetworks200ResponseNetworks defines model for GetOrganizationAvailableNetworks200ResponseNetworks. -type GetOrganizationAvailableNetworks200ResponseNetworks struct { - DataCenter *GetOrganizationAvailableNetworksPartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetOrganizationAvailableNetworks200ResponseVirtualNetworks defines model for GetOrganizationAvailableNetworks200ResponseVirtualNetworks. -type GetOrganizationAvailableNetworks200ResponseVirtualNetworks struct { - DataCenter *GetOrganizationAvailableNetworksPartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetOrganizationAvailableNetworksPartDataCenter defines model for GetOrganizationAvailableNetworksPartDataCenter. -type GetOrganizationAvailableNetworksPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetOrganizationCertificates200ResponseCertificates defines model for GetOrganizationCertificates200ResponseCertificates. -type GetOrganizationCertificates200ResponseCertificates struct { - ExpiresAt *int `json:"expires_at"` - Id *string `json:"id,omitempty"` - Issuer *IssuerEnum `json:"issuer,omitempty"` - LastIssuedAt *int `json:"last_issued_at"` - Name *string `json:"name,omitempty"` - State *CertificateStateEnum `json:"state,omitempty"` -} - -// GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies defines model for GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies. -type GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies struct { - Id *string `json:"id,omitempty"` - Retention *int `json:"retention,omitempty"` - Schedule *GetOrganizationDiskBackupPoliciesPartSchedule `json:"schedule,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` - TotalSize *float32 `json:"total_size,omitempty"` -} - -// GetOrganizationDiskBackupPoliciesPartSchedule defines model for GetOrganizationDiskBackupPoliciesPartSchedule. -type GetOrganizationDiskBackupPoliciesPartSchedule struct { - Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` - NextInvocationAt *int `json:"next_invocation_at,omitempty"` -} - -// GetOrganizationDiskTemplates200ResponseDiskTemplates defines model for GetOrganizationDiskTemplates200ResponseDiskTemplates. -type GetOrganizationDiskTemplates200ResponseDiskTemplates struct { - Description *string `json:"description"` - Id *string `json:"id,omitempty"` - LatestVersion *GetOrganizationDiskTemplatesPartLatestVersion `json:"latest_version"` - Name *string `json:"name,omitempty"` - OperatingSystem *GetOrganizationDiskTemplatesPartOperatingSystem `json:"operating_system"` - Permalink *string `json:"permalink,omitempty"` - Universal *bool `json:"universal,omitempty"` -} - -// GetOrganizationDiskTemplatesPartLatestVersion defines model for GetOrganizationDiskTemplatesPartLatestVersion. -type GetOrganizationDiskTemplatesPartLatestVersion struct { - Id *string `json:"id,omitempty"` - Number *int `json:"number,omitempty"` -} - -// GetOrganizationDiskTemplatesPartOperatingSystem defines model for GetOrganizationDiskTemplatesPartOperatingSystem. -type GetOrganizationDiskTemplatesPartOperatingSystem struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetOrganizationDisks200ResponseDisk defines model for GetOrganizationDisks200ResponseDisk. -type GetOrganizationDisks200ResponseDisk struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - State *DiskStateEnum `json:"state,omitempty"` - VirtualMachineDisk *GetOrganizationDisksPartVirtualMachineDisk `json:"virtual_machine_disk"` - Wwn *string `json:"wwn,omitempty"` -} - -// GetOrganizationDisksPartVirtualMachine defines model for GetOrganizationDisksPartVirtualMachine. -type GetOrganizationDisksPartVirtualMachine struct { - Fqdn *string `json:"fqdn,omitempty"` - Id *string `json:"id,omitempty"` -} - -// GetOrganizationDisksPartVirtualMachineDisk defines model for GetOrganizationDisksPartVirtualMachineDisk. -type GetOrganizationDisksPartVirtualMachineDisk struct { - VirtualMachine *GetOrganizationDisksPartVirtualMachine `json:"virtual_machine,omitempty"` -} - -// GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes defines model for GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes. -type GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes struct { - Associations *[]string `json:"associations,omitempty"` - DataCenter *GetOrganizationFileStorageVolumesPartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - - // NfsLocation The NFS location of where to mount the volume from. - NfsLocation *string `json:"nfs_location"` - - // Size The size of the volume in bytes. - Size *int `json:"size"` - State *FileStorageVolumeStateEnum `json:"state,omitempty"` -} - -// GetOrganizationFileStorageVolumesPartDataCenter defines model for GetOrganizationFileStorageVolumesPartDataCenter. -type GetOrganizationFileStorageVolumesPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetOrganizationIPAddresses200ResponseIPAddresses defines model for GetOrganizationIPAddresses200ResponseIPAddresses. -type GetOrganizationIPAddresses200ResponseIPAddresses struct { - Address *string `json:"address,omitempty"` - AllocationId *string `json:"allocation_id"` - AllocationType *string `json:"allocation_type"` - Id *string `json:"id,omitempty"` - ReverseDns *string `json:"reverse_dns,omitempty"` - Vip *bool `json:"vip,omitempty"` -} - -// GetOrganizationLoadBalancers200ResponseLoadBalancers defines model for GetOrganizationLoadBalancers200ResponseLoadBalancers. -type GetOrganizationLoadBalancers200ResponseLoadBalancers struct { - ApiReference *string `json:"api_reference"` - DataCenter *GetOrganizationLoadBalancersPartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - IpAddress *[]GetOrganizationLoadBalancersPartIPAddress `json:"ip_address,omitempty"` - Name *string `json:"name,omitempty"` - ResourceIds *[]string `json:"resource_ids,omitempty"` - ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` - Resources *[]LoadBalancerResource `json:"resources,omitempty"` -} - -// GetOrganizationLoadBalancersPartDataCenter defines model for GetOrganizationLoadBalancersPartDataCenter. -type GetOrganizationLoadBalancersPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetOrganizationLoadBalancersPartIPAddress defines model for GetOrganizationLoadBalancersPartIPAddress. -type GetOrganizationLoadBalancersPartIPAddress struct { - Address *string `json:"address,omitempty"` -} - -// GetOrganizationManaged200ResponseOrganizations defines model for GetOrganizationManaged200ResponseOrganizations. -type GetOrganizationManaged200ResponseOrganizations struct { - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - InfrastructureDomain *string `json:"infrastructure_domain,omitempty"` - Managed *bool `json:"managed,omitempty"` - Name *string `json:"name,omitempty"` - SubDomain *string `json:"sub_domain,omitempty"` -} - -// GetOrganizationTags200ResponseTags defines model for GetOrganizationTags200ResponseTags. -type GetOrganizationTags200ResponseTags struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetOrganizationUsersWithAccess200ResponseUsers defines model for GetOrganizationUsersWithAccess200ResponseUsers. -type GetOrganizationUsersWithAccess200ResponseUsers struct { - User *User `json:"user"` -} - -// GetOrganizationVirtualMachines200ResponseVirtualMachines defines model for GetOrganizationVirtualMachines200ResponseVirtualMachines. -type GetOrganizationVirtualMachines200ResponseVirtualMachines struct { - CreatedAt *int `json:"created_at,omitempty"` - Fqdn *string `json:"fqdn,omitempty"` - GpuType *GetOrganizationVirtualMachinesPartGPUType `json:"gpu_type"` - Hostname *string `json:"hostname,omitempty"` - Id *string `json:"id,omitempty"` - IpAddresses *[]GetOrganizationVirtualMachinesPartIPAddresses `json:"ip_addresses,omitempty"` - Name *string `json:"name,omitempty"` - Package *GetOrganizationVirtualMachinesPartPackage `json:"package"` - Zone *Zone `json:"zone,omitempty"` -} - -// GetOrganizationVirtualMachinesPartGPUType defines model for GetOrganizationVirtualMachinesPartGPUType. -type GetOrganizationVirtualMachinesPartGPUType struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetOrganizationVirtualMachinesPartIPAddresses defines model for GetOrganizationVirtualMachinesPartIPAddresses. -type GetOrganizationVirtualMachinesPartIPAddresses struct { - Address *string `json:"address,omitempty"` -} - -// GetOrganizationVirtualMachinesPartPackage defines model for GetOrganizationVirtualMachinesPartPackage. -type GetOrganizationVirtualMachinesPartPackage struct { - Name *string `json:"name,omitempty"` -} - -// GetOrganizations200ResponseOrganizations defines model for GetOrganizations200ResponseOrganizations. -type GetOrganizations200ResponseOrganizations struct { - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - InfrastructureDomain *string `json:"infrastructure_domain,omitempty"` - Managed *bool `json:"managed,omitempty"` - Name *string `json:"name,omitempty"` - SubDomain *string `json:"sub_domain,omitempty"` - Suspended *bool `json:"suspended,omitempty"` -} - -// GetSecurityGroupRules200ResponseSecurityGroupRules defines model for GetSecurityGroupRules200ResponseSecurityGroupRules. -type GetSecurityGroupRules200ResponseSecurityGroupRules struct { - Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` - Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` - Id *string `json:"id,omitempty"` - Notes *string `json:"notes"` - Ports *string `json:"ports"` - Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` - Targets *[]string `json:"targets,omitempty"` -} - -// GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule defines model for GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule. -type GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule struct { - Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` - Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` - Id *string `json:"id,omitempty"` - Notes *string `json:"notes"` - Ports *string `json:"ports"` - Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` - SecurityGroup *GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup `json:"security_group,omitempty"` - Targets *[]string `json:"targets,omitempty"` -} - -// GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup defines model for GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup. -type GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetUsersCurrent200ResponseOrganizations defines model for GetUsersCurrent200ResponseOrganizations. -type GetUsersCurrent200ResponseOrganizations struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SubDomain *string `json:"sub_domain,omitempty"` -} - -// GetVMNIVMNI200ResponseVirtualMachineNetworkInterface defines model for GetVMNIVMNI200ResponseVirtualMachineNetworkInterface. -type GetVMNIVMNI200ResponseVirtualMachineNetworkInterface struct { - Id *string `json:"id,omitempty"` - IpAddresses *[]GetVMNIVMNIPartIPAddresses `json:"ip_addresses,omitempty"` - MacAddress *string `json:"mac_address,omitempty"` - Name *string `json:"name,omitempty"` - Network *GetVMNIVMNIPartNetwork `json:"network,omitempty"` - SpeedProfile *GetVMNIVMNIPartSpeedProfile `json:"speed_profile,omitempty"` - State *string `json:"state,omitempty"` - VirtualMachine *GetVMNIVMNIPartVirtualMachine `json:"virtual_machine,omitempty"` -} - -// GetVMNIVMNIPartIPAddresses defines model for GetVMNIVMNIPartIPAddresses. -type GetVMNIVMNIPartIPAddresses struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// GetVMNIVMNIPartNetwork defines model for GetVMNIVMNIPartNetwork. -type GetVMNIVMNIPartNetwork struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetVMNIVMNIPartSpeedProfile defines model for GetVMNIVMNIPartSpeedProfile. -type GetVMNIVMNIPartSpeedProfile struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetVMNIVMNIPartVirtualMachine defines model for GetVMNIVMNIPartVirtualMachine. -type GetVMNIVMNIPartVirtualMachine struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetVirtualMachine200ResponseVirtualMachine defines model for GetVirtualMachine200ResponseVirtualMachine. -type GetVirtualMachine200ResponseVirtualMachine struct { - AttachedIso *ISO `json:"attached_iso"` - CpuCores *int `json:"cpu_cores"` - CreatedAt *int `json:"created_at,omitempty"` - Description *string `json:"description"` - Fqdn *string `json:"fqdn,omitempty"` - GpuType *GetVirtualMachinePartGPUType `json:"gpu_type"` - Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` - Group *VirtualMachineGroup `json:"group"` - Hostname *string `json:"hostname,omitempty"` - Id *string `json:"id,omitempty"` - InitialRootPassword *string `json:"initial_root_password"` - IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` - MemoryInGb *int `json:"memory_in_gb"` - Name *string `json:"name,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Package *VirtualMachinePackage `json:"package"` - State *VirtualMachineStateEnum `json:"state,omitempty"` - TagNames *[]string `json:"tag_names,omitempty"` - Tags *[]Tag `json:"tags,omitempty"` - UseDedicatedCpus *bool `json:"use_dedicated_cpus"` - Zone *Zone `json:"zone,omitempty"` -} - -// GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies defines model for GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies. -type GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies struct { - Id *string `json:"id,omitempty"` - Retention *int `json:"retention,omitempty"` - Schedule *GetVirtualMachineDiskBackupPoliciesPartSchedule `json:"schedule,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` - TotalSize *float32 `json:"total_size,omitempty"` -} - -// GetVirtualMachineDiskBackupPoliciesPartSchedule defines model for GetVirtualMachineDiskBackupPoliciesPartSchedule. -type GetVirtualMachineDiskBackupPoliciesPartSchedule struct { - Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` - NextInvocationAt *int `json:"next_invocation_at,omitempty"` -} - -// GetVirtualMachineDisks200ResponseDisks defines model for GetVirtualMachineDisks200ResponseDisks. -type GetVirtualMachineDisks200ResponseDisks struct { - AttachOnBoot *bool `json:"attach_on_boot,omitempty"` - Boot *bool `json:"boot,omitempty"` - Disk *GetVirtualMachineDisksPartDisk `json:"disk,omitempty"` - State *VirtualMachineDiskAttachmentStateEnum `json:"state,omitempty"` -} - -// GetVirtualMachineDisksPartDisk defines model for GetVirtualMachineDisksPartDisk. -type GetVirtualMachineDisksPartDisk struct { - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - SizeInGb *int `json:"size_in_gb,omitempty"` - State *DiskStateEnum `json:"state,omitempty"` - Wwn *string `json:"wwn,omitempty"` -} - -// GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface defines model for GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface. -type GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface struct { - Id *string `json:"id,omitempty"` - IpAddresses *[]GetVirtualMachineNetworkInterfacePartIPAddresses `json:"ip_addresses,omitempty"` - MacAddress *string `json:"mac_address,omitempty"` - Name *string `json:"name,omitempty"` - Network *GetVirtualMachineNetworkInterfacePartNetwork `json:"network,omitempty"` - State *string `json:"state,omitempty"` - VirtualMachine *GetVirtualMachineNetworkInterfacePartVirtualMachine `json:"virtual_machine,omitempty"` -} - -// GetVirtualMachineNetworkInterfacePartIPAddresses defines model for GetVirtualMachineNetworkInterfacePartIPAddresses. -type GetVirtualMachineNetworkInterfacePartIPAddresses struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// GetVirtualMachineNetworkInterfacePartNetwork defines model for GetVirtualMachineNetworkInterfacePartNetwork. -type GetVirtualMachineNetworkInterfacePartNetwork struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetVirtualMachineNetworkInterfacePartVirtualMachine defines model for GetVirtualMachineNetworkInterfacePartVirtualMachine. -type GetVirtualMachineNetworkInterfacePartVirtualMachine struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces defines model for GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces. -type GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces struct { - Id *string `json:"id,omitempty"` - IpAddresses *[]GetVirtualMachineNetworkInterfacesPartIPAddresses `json:"ip_addresses,omitempty"` - Name *string `json:"name,omitempty"` - Network *GetVirtualMachineNetworkInterfacesPartNetwork `json:"network,omitempty"` -} - -// GetVirtualMachineNetworkInterfacesPartIPAddresses defines model for GetVirtualMachineNetworkInterfacesPartIPAddresses. -type GetVirtualMachineNetworkInterfacesPartIPAddresses struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// GetVirtualMachineNetworkInterfacesPartNetwork defines model for GetVirtualMachineNetworkInterfacesPartNetwork. -type GetVirtualMachineNetworkInterfacesPartNetwork struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// GetVirtualMachinePackages200ResponseVirtualMachinePackages defines model for GetVirtualMachinePackages200ResponseVirtualMachinePackages. -type GetVirtualMachinePackages200ResponseVirtualMachinePackages struct { - CpuCores *int `json:"cpu_cores,omitempty"` - Icon *GetVirtualMachinePackagesPartIcon `json:"icon"` - Id *string `json:"id,omitempty"` - Ipv4Addresses *int `json:"ipv4_addresses,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` - Privacy *PrivacyTypesEnum `json:"privacy,omitempty"` - StorageInGb *int `json:"storage_in_gb,omitempty"` -} - -// GetVirtualMachinePackagesPartIcon defines model for GetVirtualMachinePackagesPartIcon. -type GetVirtualMachinePackagesPartIcon struct { - Url *string `json:"url,omitempty"` -} - -// GetVirtualMachinePartGPUType defines model for GetVirtualMachinePartGPUType. -type GetVirtualMachinePartGPUType struct { - Id *string `json:"id,omitempty"` - Manufacturer *string `json:"manufacturer,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MemoryType *string `json:"memory_type,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild defines model for GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild. -type GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild struct { - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - SpecXml *string `json:"spec_xml,omitempty"` - State *VirtualMachineBuildStateEnum `json:"state,omitempty"` - VirtualMachine *GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine `json:"virtual_machine"` -} - -// GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine defines model for GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine. -type GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine struct { - Fqdn *string `json:"fqdn,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - State *VirtualMachineStateEnum `json:"state,omitempty"` -} - -// GetZones200ResponseZones defines model for GetZones200ResponseZones. -type GetZones200ResponseZones struct { - DataCenter *GetZonesPartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// GetZonesPartDataCenter defines model for GetZonesPartDataCenter. -type GetZonesPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// IPAddress defines model for IPAddress. -type IPAddress struct { - Address *string `json:"address,omitempty"` - AddressWithMask *string `json:"address_with_mask,omitempty"` - AllocationId *string `json:"allocation_id"` - AllocationType *string `json:"allocation_type"` - Id *string `json:"id,omitempty"` - Label *string `json:"label"` - Network *Network `json:"network,omitempty"` - ReverseDns *string `json:"reverse_dns,omitempty"` - Vip *bool `json:"vip,omitempty"` -} - -// IPAddressLookup All 'ip_address[]' params are mutually exclusive, only one can be provided. -type IPAddressLookup struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// IPAddressNotFoundEnum defines model for IPAddressNotFoundEnum. -type IPAddressNotFoundEnum string - -// IPAddressNotFoundSchema No IP addresses were found matching any of the criteria provided in the arguments -type IPAddressNotFoundSchema struct { - Code *IPAddressNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// IPAddressVersionEnum defines model for IPAddressVersionEnum. -type IPAddressVersionEnum string - -// IPAlreadyAllocatedEnum defines model for IPAlreadyAllocatedEnum. -type IPAlreadyAllocatedEnum string - -// IPAlreadyAllocatedSchema This IP address has already been allocated to another resource -type IPAlreadyAllocatedSchema struct { - Code *IPAlreadyAllocatedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// ISO defines model for ISO. -type ISO struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - OperatingSystem *OperatingSystem `json:"operating_system"` -} - -// IdentityNotLinkedToWebSessionEnum defines model for IdentityNotLinkedToWebSessionEnum. -type IdentityNotLinkedToWebSessionEnum string - -// IdentityNotLinkedToWebSessionSchema The authenticated identity is not linked to a web session -type IdentityNotLinkedToWebSessionSchema struct { - Code *IdentityNotLinkedToWebSessionEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// InterfaceNotFoundEnum defines model for InterfaceNotFoundEnum. -type InterfaceNotFoundEnum string - -// InterfaceNotFoundSchema An interface could not be found for the specified network -type InterfaceNotFoundSchema struct { - Code *InterfaceNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// InvalidAPIToken defines model for InvalidAPIToken. -type InvalidAPIToken struct { - Details *string `json:"details"` -} - -// InvalidAPITokenEnum defines model for InvalidAPITokenEnum. -type InvalidAPITokenEnum string - -// InvalidAPITokenSchema The API token provided was not valid (it may not exist or have expired) -type InvalidAPITokenSchema struct { - Code *InvalidAPITokenEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *InvalidAPIToken `json:"detail,omitempty"` -} - -// InvalidIPEnum defines model for InvalidIPEnum. -type InvalidIPEnum string - -// InvalidIPSchema This IP address is not valid for this network interface. -type InvalidIPSchema struct { - Code *InvalidIPEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// InvalidSpecXML defines model for InvalidSpecXML. -type InvalidSpecXML struct { - // Errors A textual description of the errors with the provided XML - Errors *string `json:"errors,omitempty"` -} - -// InvalidSpecXMLEnum defines model for InvalidSpecXMLEnum. -type InvalidSpecXMLEnum string - -// InvalidSpecXMLSchema The spec XML provided is invalid -type InvalidSpecXMLSchema struct { - Code *InvalidSpecXMLEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *InvalidSpecXML `json:"detail,omitempty"` -} - -// InvalidTimestampEnum defines model for InvalidTimestampEnum. -type InvalidTimestampEnum string - -// InvalidTimestampSchema Timestamp must be at least 5 minutes in the future. If you want to delete something immediately, you use can use the delete endpoint. -type InvalidTimestampSchema struct { - Code *InvalidTimestampEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// IssuerEnum defines model for IssuerEnum. -type IssuerEnum string - -// KeyValue All 'disk_template_options[]' params are mutually exclusive, only one can be provided. -type KeyValue struct { - Key string `json:"key"` - Value *string `json:"value,omitempty"` -} - -// LoadBalancerArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type LoadBalancerArguments struct { - ApiReference *string `json:"api_reference,omitempty"` - - // DataCenter All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenter *DataCenterLookup `json:"data_center,omitempty"` - EnableWeighting *bool `json:"enable_weighting,omitempty"` - HttpsRedirect *bool `json:"https_redirect,omitempty"` - Name *string `json:"name,omitempty"` - ResourceIds *[]string `json:"resource_ids,omitempty"` - ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` - StandbyVms *[]string `json:"standby_vms,omitempty"` - Weights *[]LoadBalancerWeightsArguments `json:"weights,omitempty"` -} - -// LoadBalancerLookup All 'load_balancer[]' params are mutually exclusive, only one can be provided. -type LoadBalancerLookup struct { - ApiReference *string `json:"api_reference,omitempty"` - Id *string `json:"id,omitempty"` -} - -// LoadBalancerNotFoundEnum defines model for LoadBalancerNotFoundEnum. -type LoadBalancerNotFoundEnum string - -// LoadBalancerResource defines model for LoadBalancerResource. -type LoadBalancerResource struct { - Resources *LoadBalancerResource_Resources `json:"resources,omitempty"` -} - -// LoadBalancerResource_Resources defines model for LoadBalancerResource.Resources. -type LoadBalancerResource_Resources struct { - union json.RawMessage -} - -// LoadBalancerResourceTypesEnum defines model for LoadBalancerResourceTypesEnum. -type LoadBalancerResourceTypesEnum string - -// LoadBalancerRuleAlgorithmEnum defines model for LoadBalancerRuleAlgorithmEnum. -type LoadBalancerRuleAlgorithmEnum string - -// LoadBalancerRuleArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type LoadBalancerRuleArguments struct { - Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` - BackendSsl *bool `json:"backend_ssl,omitempty"` - Certificates *[]CertificateLookup `json:"certificates,omitempty"` - CheckEnabled *bool `json:"check_enabled,omitempty"` - CheckFall *int `json:"check_fall,omitempty"` - CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses,omitempty"` - CheckInterval *int `json:"check_interval,omitempty"` - CheckPath *string `json:"check_path,omitempty"` - CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol,omitempty"` - CheckRise *int `json:"check_rise,omitempty"` - CheckTimeout *int `json:"check_timeout,omitempty"` - DestinationPort *int `json:"destination_port,omitempty"` - ListenPort *int `json:"listen_port,omitempty"` - PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` - Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` - ProxyProtocol *bool `json:"proxy_protocol,omitempty"` -} - -// LoadBalancerRuleCheckProtocolEnum defines model for LoadBalancerRuleCheckProtocolEnum. -type LoadBalancerRuleCheckProtocolEnum string - -// LoadBalancerRuleHTTPStatusesEnum defines model for LoadBalancerRuleHTTPStatusesEnum. -type LoadBalancerRuleHTTPStatusesEnum string - -// LoadBalancerRuleLookup All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. -type LoadBalancerRuleLookup struct { - Id *string `json:"id,omitempty"` -} - -// LoadBalancerRuleNotFoundEnum defines model for LoadBalancerRuleNotFoundEnum. -type LoadBalancerRuleNotFoundEnum string - -// LoadBalancerRuleProtocolEnum defines model for LoadBalancerRuleProtocolEnum. -type LoadBalancerRuleProtocolEnum string - -// LoadBalancerWeight defines model for LoadBalancerWeight. -type LoadBalancerWeight struct { - VirtualMachineId *string `json:"virtual_machine_id,omitempty"` - Weight *int `json:"weight,omitempty"` -} - -// LoadBalancerWeightsArguments All 'weights[]' params are mutually exclusive, only one can be provided. -type LoadBalancerWeightsArguments struct { - VirtualMachineId *string `json:"virtual_machine_id,omitempty"` - Weight *int `json:"weight,omitempty"` -} - -// LocationRequiredEnum defines model for LocationRequiredEnum. -type LocationRequiredEnum string - -// LocationRequiredSchema A zone or a data_center argument must be provided -type LocationRequiredSchema struct { - Code *LocationRequiredEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// MissingAPITokenEnum defines model for MissingAPITokenEnum. -type MissingAPITokenEnum string - -// Network defines model for Network. -type Network struct { - DataCenter *DataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// NetworkLookup All 'network[]' params are mutually exclusive, only one can be provided. -type NetworkLookup struct { - Id *string `json:"id,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// NetworkNotFoundEnum defines model for NetworkNotFoundEnum. -type NetworkNotFoundEnum string - -// NetworkNotFoundSchema No network was found matching any of the criteria provided in the arguments -type NetworkNotFoundSchema struct { - Code *NetworkNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// NetworkSpeedProfile defines model for NetworkSpeedProfile. -type NetworkSpeedProfile struct { - DownloadSpeedInMbit *int `json:"download_speed_in_mbit"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` - UploadSpeedInMbit *int `json:"upload_speed_in_mbit"` -} - -// NetworkSpeedProfileLookup All 'speed_profile[]' params are mutually exclusive, only one can be provided. -type NetworkSpeedProfileLookup struct { - Id *string `json:"id,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// NetworkSpeedProfileNotFoundEnum defines model for NetworkSpeedProfileNotFoundEnum. -type NetworkSpeedProfileNotFoundEnum string - -// NetworkSpeedProfileNotFoundSchema No network speed profile was found matching any of the criteria provided in the arguments -type NetworkSpeedProfileNotFoundSchema struct { - Code *NetworkSpeedProfileNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// NoAllocationEnum defines model for NoAllocationEnum. -type NoAllocationEnum string - -// NoAvailableAddressesEnum defines model for NoAvailableAddressesEnum. -type NoAvailableAddressesEnum string - -// NoInterfaceAvailableEnum defines model for NoInterfaceAvailableEnum. -type NoInterfaceAvailableEnum string - -// NoInterfaceAvailableSchema This virtual machine does not have a network interface that is compatible with the provided IP address -type NoInterfaceAvailableSchema struct { - Code *NoInterfaceAvailableEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// NoUserAssociatedWithIdentityEnum defines model for NoUserAssociatedWithIdentityEnum. -type NoUserAssociatedWithIdentityEnum string - -// ObjectInTrash defines model for ObjectInTrash. -type ObjectInTrash struct { - TrashObject *TrashObject `json:"trash_object"` -} - -// ObjectInTrashEnum defines model for ObjectInTrashEnum. -type ObjectInTrashEnum string - -// ObjectInTrashSchema The object found is in the trash and therefore cannot be manipulated through the API. It should be restored in order to run this operation. -type ObjectInTrashSchema struct { - Code *ObjectInTrashEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *ObjectInTrash `json:"detail,omitempty"` -} - -// OneOfAPIAuthenticator403Response defines model for OneOfAPIAuthenticator403Response. -type OneOfAPIAuthenticator403Response struct { - union json.RawMessage -} - -// OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res defines model for OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res. -type OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res struct { - union json.RawMessage -} - -// OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res defines model for OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res. -type OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res struct { - union json.RawMessage -} - -// OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res. -type OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res struct { - union json.RawMessage -} - -// OneOfIPAddressNotFoundVirtualMachineNotFound404Res defines model for OneOfIPAddressNotFoundVirtualMachineNotFound404Res. -type OneOfIPAddressNotFoundVirtualMachineNotFound404Res struct { - union json.RawMessage -} - -// OneOfIPAlreadyAllocatedInvalidIP422Res defines model for OneOfIPAlreadyAllocatedInvalidIP422Res. -type OneOfIPAlreadyAllocatedInvalidIP422Res struct { - union json.RawMessage -} - -// OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res defines model for OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res. -type OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res struct { - union json.RawMessage -} - -// OneOfIdentityNotLinkedToWebSession400Res defines model for OneOfIdentityNotLinkedToWebSession400Res. -type OneOfIdentityNotLinkedToWebSession400Res struct { - union json.RawMessage -} - -// OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res defines model for OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res. -type OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res struct { - union json.RawMessage -} - -// OneOfInvalidSpecXML400Res defines model for OneOfInvalidSpecXML400Res. -type OneOfInvalidSpecXML400Res struct { - union json.RawMessage -} - -// OneOfInvalidTimestamp400Res defines model for OneOfInvalidTimestamp400Res. -type OneOfInvalidTimestamp400Res struct { - union json.RawMessage -} - -// OneOfLocationRequiredValidationError422Res defines model for OneOfLocationRequiredValidationError422Res. -type OneOfLocationRequiredValidationError422Res struct { - union json.RawMessage -} - -// OneOfNetworkNotFoundOrganizationNotFound404Res defines model for OneOfNetworkNotFoundOrganizationNotFound404Res. -type OneOfNetworkNotFoundOrganizationNotFound404Res struct { - union json.RawMessage -} - -// OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res. -type OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res struct { - union json.RawMessage -} - -// OneOfObjectInTrashTaskQueueingError406Res defines model for OneOfObjectInTrashTaskQueueingError406Res. -type OneOfObjectInTrashTaskQueueingError406Res struct { - union json.RawMessage -} - -// OneOfObjectInTrashVirtualMachineMustBeStarted406Res defines model for OneOfObjectInTrashVirtualMachineMustBeStarted406Res. -type OneOfObjectInTrashVirtualMachineMustBeStarted406Res struct { - union json.RawMessage -} - -// OneOfOperatingSystemNotFoundOrganizationNotFound404Res defines model for OneOfOperatingSystemNotFoundOrganizationNotFound404Res. -type OneOfOperatingSystemNotFoundOrganizationNotFound404Res struct { - union json.RawMessage -} - -// OneOfOrganizationLimitReachedValidationError422Res defines model for OneOfOrganizationLimitReachedValidationError422Res. -type OneOfOrganizationLimitReachedValidationError422Res struct { - union json.RawMessage -} - -// OneOfOrganizationNotActivatedOrganizationSuspended403Res defines model for OneOfOrganizationNotActivatedOrganizationSuspended403Res. -type OneOfOrganizationNotActivatedOrganizationSuspended403Res struct { - union json.RawMessage -} - -// OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res defines model for OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res. -type OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res struct { - union json.RawMessage -} - -// OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res defines model for OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res. -type OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res struct { - union json.RawMessage -} - -// OneOfPermissionDenied403Res defines model for OneOfPermissionDenied403Res. -type OneOfPermissionDenied403Res struct { - union json.RawMessage -} - -// OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res defines model for OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res. -type OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res struct { - union json.RawMessage -} - -// OperatingSystem defines model for OperatingSystem. -type OperatingSystem struct { - Badge *Attachment `json:"badge"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// OperatingSystemNotFoundEnum defines model for OperatingSystemNotFoundEnum. -type OperatingSystemNotFoundEnum string - -// OperatingSystemNotFoundSchema No operating system was found matching any of the criteria provided in the arguments -type OperatingSystemNotFoundSchema struct { - Code *OperatingSystemNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// Organization defines model for Organization. -type Organization struct { - Address1 *string `json:"address1"` - Address2 *string `json:"address2"` - Address3 *string `json:"address3"` - Address4 *string `json:"address4"` - BillingName *string `json:"billing_name"` - Country *Country `json:"country"` - CountryState *CountryState `json:"country_state"` - CreatedAt *int `json:"created_at,omitempty"` - Currency *Currency `json:"currency,omitempty"` - Id *string `json:"id,omitempty"` - InfrastructureDomain *string `json:"infrastructure_domain,omitempty"` - Managed *bool `json:"managed,omitempty"` - Name *string `json:"name,omitempty"` - PhoneNumber *string `json:"phone_number"` - Postcode *string `json:"postcode"` - SubDomain *string `json:"sub_domain,omitempty"` - Suspended *bool `json:"suspended,omitempty"` - VatNumber *string `json:"vat_number"` -} - -// OrganizationLimitReachedEnum defines model for OrganizationLimitReachedEnum. -type OrganizationLimitReachedEnum string - -// OrganizationLimitReachedSchema The maxmium number of organizations that can be created has been reached -type OrganizationLimitReachedSchema struct { - Code *OrganizationLimitReachedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// OrganizationLookup All 'organization[]' params are mutually exclusive, only one can be provided. -type OrganizationLookup struct { - Id *string `json:"id,omitempty"` - SubDomain *string `json:"sub_domain,omitempty"` -} - -// OrganizationNotActivatedEnum defines model for OrganizationNotActivatedEnum. -type OrganizationNotActivatedEnum string - -// OrganizationNotActivatedSchema An organization was found from the arguments provided but it wasn't activated yet -type OrganizationNotActivatedSchema struct { - Code *OrganizationNotActivatedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// OrganizationNotFoundEnum defines model for OrganizationNotFoundEnum. -type OrganizationNotFoundEnum string - -// OrganizationNotFoundSchema No organization was found matching any of the criteria provided in the arguments -type OrganizationNotFoundSchema struct { - Code *OrganizationNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// OrganizationSuspendedEnum defines model for OrganizationSuspendedEnum. -type OrganizationSuspendedEnum string - -// OrganizationSuspendedSchema An organization was found from the arguments provided but it was suspended -type OrganizationSuspendedSchema struct { - Code *OrganizationSuspendedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// PaginationObject defines model for PaginationObject. -type PaginationObject struct { - // CurrentPage The current page - CurrentPage *int `json:"current_page,omitempty"` - - // LargeSet Is this a large set and therefore the total number of records cannot be returned? - LargeSet *bool `json:"large_set,omitempty"` - - // PerPage The number of items per page - PerPage *int `json:"per_page,omitempty"` - - // Total The total number of items across all pages - Total *int `json:"total"` - - // TotalPages The total number of pages - TotalPages *int `json:"total_pages"` -} - -// PatchDiskBackupPolicy200ResponseDiskBackupPolicy defines model for PatchDiskBackupPolicy200ResponseDiskBackupPolicy. -type PatchDiskBackupPolicy200ResponseDiskBackupPolicy struct { - Id *string `json:"id,omitempty"` - Retention *int `json:"retention,omitempty"` - Schedule *map[string]interface{} `json:"schedule,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` -} - -// PatchFileStorageVolume200ResponseFileStorageVolume defines model for PatchFileStorageVolume200ResponseFileStorageVolume. -type PatchFileStorageVolume200ResponseFileStorageVolume struct { - Associations *[]string `json:"associations,omitempty"` - DataCenter *PatchFileStorageVolumePartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - - // NfsLocation The NFS location of where to mount the volume from. - NfsLocation *string `json:"nfs_location"` - - // Size The size of the volume in bytes. - Size *int `json:"size"` - State *FileStorageVolumeStateEnum `json:"state,omitempty"` -} - -// PatchFileStorageVolumePartDataCenter defines model for PatchFileStorageVolumePartDataCenter. -type PatchFileStorageVolumePartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// PatchLoadBalancer200ResponseLoadBalancer defines model for PatchLoadBalancer200ResponseLoadBalancer. -type PatchLoadBalancer200ResponseLoadBalancer struct { - ApiReference *string `json:"api_reference"` - BackendCertificate *string `json:"backend_certificate,omitempty"` - BackendCertificateKey *string `json:"backend_certificate_key,omitempty"` - DataCenter *PatchLoadBalancerPartDataCenter `json:"data_center,omitempty"` - EnableWeighting *bool `json:"enable_weighting,omitempty"` - HttpsRedirect *bool `json:"https_redirect,omitempty"` - Id *string `json:"id,omitempty"` - IpAddress *[]PatchLoadBalancerPartIPAddress `json:"ip_address,omitempty"` - Name *string `json:"name,omitempty"` - ResourceIds *[]string `json:"resource_ids,omitempty"` - ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` - Resources *[]LoadBalancerResource `json:"resources,omitempty"` - StandbyVms *[]string `json:"standby_vms,omitempty"` - Weights *[]LoadBalancerWeight `json:"weights,omitempty"` -} - -// PatchLoadBalancerPartDataCenter defines model for PatchLoadBalancerPartDataCenter. -type PatchLoadBalancerPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// PatchLoadBalancerPartIPAddress defines model for PatchLoadBalancerPartIPAddress. -type PatchLoadBalancerPartIPAddress struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule defines model for PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule. -type PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule struct { - Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` - BackendSsl *bool `json:"backend_ssl,omitempty"` - Certificates *[]PatchLoadBalancersRulesLoadBalancerRulePartCertificates `json:"certificates,omitempty"` - CheckEnabled *bool `json:"check_enabled,omitempty"` - CheckFall *int `json:"check_fall,omitempty"` - CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses"` - CheckInterval *int `json:"check_interval,omitempty"` - CheckPath *string `json:"check_path,omitempty"` - CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol"` - CheckRise *int `json:"check_rise,omitempty"` - CheckTimeout *int `json:"check_timeout,omitempty"` - DestinationPort *int `json:"destination_port,omitempty"` - Id *string `json:"id,omitempty"` - ListenPort *int `json:"listen_port,omitempty"` - LoadBalancer *PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer `json:"load_balancer,omitempty"` - PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` - Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` - ProxyProtocol *bool `json:"proxy_protocol,omitempty"` -} - -// PatchLoadBalancersRulesLoadBalancerRulePartCertificates defines model for PatchLoadBalancersRulesLoadBalancerRulePartCertificates. -type PatchLoadBalancersRulesLoadBalancerRulePartCertificates struct { - AdditionalNames *[]string `json:"additional_names,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - State *CertificateStateEnum `json:"state,omitempty"` -} - -// PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer defines model for PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer. -type PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule defines model for PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule. -type PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule struct { - Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` - Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` - Id *string `json:"id,omitempty"` - Notes *string `json:"notes"` - Ports *string `json:"ports"` - Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` - SecurityGroup *PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup `json:"security_group,omitempty"` - Targets *[]string `json:"targets,omitempty"` -} - -// PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup defines model for PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup. -type PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// PatchVirtualMachine200ResponseVirtualMachine defines model for PatchVirtualMachine200ResponseVirtualMachine. -type PatchVirtualMachine200ResponseVirtualMachine struct { - AttachedIso *ISO `json:"attached_iso"` - CpuCores *int `json:"cpu_cores"` - CreatedAt *int `json:"created_at,omitempty"` - Description *string `json:"description"` - Fqdn *string `json:"fqdn,omitempty"` - GpuType *PatchVirtualMachinePartGPUType `json:"gpu_type"` - Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` - Group *VirtualMachineGroup `json:"group"` - Hostname *string `json:"hostname,omitempty"` - Id *string `json:"id,omitempty"` - InitialRootPassword *string `json:"initial_root_password"` - IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` - MemoryInGb *int `json:"memory_in_gb"` - Name *string `json:"name,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Package *VirtualMachinePackage `json:"package"` - State *VirtualMachineStateEnum `json:"state,omitempty"` - TagNames *[]string `json:"tag_names,omitempty"` - Tags *[]Tag `json:"tags,omitempty"` - UseDedicatedCpus *bool `json:"use_dedicated_cpus"` - Zone *Zone `json:"zone,omitempty"` -} - -// PatchVirtualMachinePartGPUType defines model for PatchVirtualMachinePartGPUType. -type PatchVirtualMachinePartGPUType struct { - Id *string `json:"id,omitempty"` - Manufacturer *string `json:"manufacturer,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MemoryType *string `json:"memory_type,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// PermissionDenied defines model for PermissionDenied. -type PermissionDenied struct { - // Details Additional information regarding the reason why permission was denied - Details *string `json:"details"` -} - -// PermissionDeniedEnum defines model for PermissionDeniedEnum. -type PermissionDeniedEnum string - -// PermissionDeniedSchema The authenticated identity is not permitted to perform this action -type PermissionDeniedSchema struct { - Code *PermissionDeniedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *PermissionDenied `json:"detail,omitempty"` -} - -// PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy defines model for PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy. -type PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy struct { - AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` - Id *string `json:"id,omitempty"` - Retention *int `json:"retention,omitempty"` - Schedule *Schedule `json:"schedule,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` - TotalSize *float32 `json:"total_size,omitempty"` -} - -// PostLoadBalancerRules200ResponseLoadBalancerRule defines model for PostLoadBalancerRules200ResponseLoadBalancerRule. -type PostLoadBalancerRules200ResponseLoadBalancerRule struct { - Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` - BackendSsl *bool `json:"backend_ssl,omitempty"` - Certificates *[]PostLoadBalancerRulesPartCertificates `json:"certificates,omitempty"` - CheckEnabled *bool `json:"check_enabled,omitempty"` - CheckFall *int `json:"check_fall,omitempty"` - CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses"` - CheckInterval *int `json:"check_interval,omitempty"` - CheckPath *string `json:"check_path,omitempty"` - CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol"` - CheckRise *int `json:"check_rise,omitempty"` - CheckTimeout *int `json:"check_timeout,omitempty"` - DestinationPort *int `json:"destination_port,omitempty"` - Id *string `json:"id,omitempty"` - ListenPort *int `json:"listen_port,omitempty"` - LoadBalancer *PostLoadBalancerRulesPartLoadBalancer `json:"load_balancer,omitempty"` - PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` - Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` - ProxyProtocol *bool `json:"proxy_protocol,omitempty"` -} - -// PostLoadBalancerRulesPartCertificates defines model for PostLoadBalancerRulesPartCertificates. -type PostLoadBalancerRulesPartCertificates struct { - AdditionalNames *[]string `json:"additional_names,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - State *CertificateStateEnum `json:"state,omitempty"` -} - -// PostLoadBalancerRulesPartLoadBalancer defines model for PostLoadBalancerRulesPartLoadBalancer. -type PostLoadBalancerRulesPartLoadBalancer struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// PostOrganizationFileStorageVolumes201ResponseFileStorageVolume defines model for PostOrganizationFileStorageVolumes201ResponseFileStorageVolume. -type PostOrganizationFileStorageVolumes201ResponseFileStorageVolume struct { - Associations *[]string `json:"associations,omitempty"` - DataCenter *PostOrganizationFileStorageVolumesPartDataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - - // NfsLocation The NFS location of where to mount the volume from. - NfsLocation *string `json:"nfs_location"` - - // Size The size of the volume in bytes. - Size *int `json:"size"` - State *FileStorageVolumeStateEnum `json:"state,omitempty"` -} - -// PostOrganizationFileStorageVolumesPartDataCenter defines model for PostOrganizationFileStorageVolumesPartDataCenter. -type PostOrganizationFileStorageVolumesPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// PostOrganizationLoadBalancers200ResponseLoadBalancer defines model for PostOrganizationLoadBalancers200ResponseLoadBalancer. -type PostOrganizationLoadBalancers200ResponseLoadBalancer struct { - ApiReference *string `json:"api_reference"` - BackendCertificate *string `json:"backend_certificate,omitempty"` - BackendCertificateKey *string `json:"backend_certificate_key,omitempty"` - DataCenter *PostOrganizationLoadBalancersPartDataCenter `json:"data_center,omitempty"` - EnableWeighting *bool `json:"enable_weighting,omitempty"` - HttpsRedirect *bool `json:"https_redirect,omitempty"` - Id *string `json:"id,omitempty"` - IpAddress *[]PostOrganizationLoadBalancersPartIPAddress `json:"ip_address,omitempty"` - Name *string `json:"name,omitempty"` - ResourceIds *[]string `json:"resource_ids,omitempty"` - ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` - Resources *[]LoadBalancerResource `json:"resources,omitempty"` - StandbyVms *[]string `json:"standby_vms,omitempty"` - Weights *[]LoadBalancerWeight `json:"weights,omitempty"` -} - -// PostOrganizationLoadBalancersPartDataCenter defines model for PostOrganizationLoadBalancersPartDataCenter. -type PostOrganizationLoadBalancersPartDataCenter struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// PostOrganizationLoadBalancersPartIPAddress defines model for PostOrganizationLoadBalancersPartIPAddress. -type PostOrganizationLoadBalancersPartIPAddress struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// PostOrganizationVirtualMachinesBuild201ResponseBuild defines model for PostOrganizationVirtualMachinesBuild201ResponseBuild. -type PostOrganizationVirtualMachinesBuild201ResponseBuild struct { - Id *string `json:"id,omitempty"` - State *VirtualMachineBuildStateEnum `json:"state,omitempty"` -} - -// PostOrganizationVirtualMachinesBuild201ResponseTask defines model for PostOrganizationVirtualMachinesBuild201ResponseTask. -type PostOrganizationVirtualMachinesBuild201ResponseTask struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Status *TaskStatusEnum `json:"status,omitempty"` -} - -// PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild defines model for PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild. -type PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild struct { - Id *string `json:"id,omitempty"` - State *VirtualMachineBuildStateEnum `json:"state,omitempty"` -} - -// PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild defines model for PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild. -type PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild struct { - Id *string `json:"id,omitempty"` - State *VirtualMachineBuildStateEnum `json:"state,omitempty"` -} - -// PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask defines model for PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask. -type PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Status *TaskStatusEnum `json:"status,omitempty"` -} - -// PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild defines model for PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild. -type PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild struct { - Id *string `json:"id,omitempty"` - State *VirtualMachineBuildStateEnum `json:"state,omitempty"` -} - -// PostSecurityGroupRules200ResponseSecurityGroupRule defines model for PostSecurityGroupRules200ResponseSecurityGroupRule. -type PostSecurityGroupRules200ResponseSecurityGroupRule struct { - Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` - Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` - Id *string `json:"id,omitempty"` - Notes *string `json:"notes"` - Ports *string `json:"ports"` - Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` - SecurityGroup *PostSecurityGroupRulesPartSecurityGroup `json:"security_group,omitempty"` - Targets *[]string `json:"targets,omitempty"` -} - -// PostSecurityGroupRulesPartSecurityGroup defines model for PostSecurityGroupRulesPartSecurityGroup. -type PostSecurityGroupRulesPartSecurityGroup struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// PostVirtualMachineConsoleSessions201ResponseConsoleSession defines model for PostVirtualMachineConsoleSessions201ResponseConsoleSession. -type PostVirtualMachineConsoleSessions201ResponseConsoleSession struct { - ExpiresAt *int `json:"expires_at,omitempty"` - Id *string `json:"id,omitempty"` - Url *string `json:"url,omitempty"` - VirtualMachine *PostVirtualMachineConsoleSessionsPartVirtualMachine `json:"virtual_machine,omitempty"` -} - -// PostVirtualMachineConsoleSessionsPartVirtualMachine defines model for PostVirtualMachineConsoleSessionsPartVirtualMachine. -type PostVirtualMachineConsoleSessionsPartVirtualMachine struct { - Fqdn *string `json:"fqdn,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - State *VirtualMachineStateEnum `json:"state,omitempty"` -} - -// PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy defines model for PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy. -type PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy struct { - AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` - Id *string `json:"id,omitempty"` - Retention *int `json:"retention,omitempty"` - Schedule *Schedule `json:"schedule,omitempty"` - Target *DiskBackupPolicyTarget `json:"target,omitempty"` - TotalSize *float32 `json:"total_size,omitempty"` -} - -// PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface defines model for PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface. -type PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface struct { - Id *string `json:"id,omitempty"` - IpAddresses *[]PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses `json:"ip_addresses,omitempty"` - MacAddress *string `json:"mac_address,omitempty"` - Name *string `json:"name,omitempty"` - Network *PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork `json:"network,omitempty"` - State *string `json:"state,omitempty"` - VirtualMachine *PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine `json:"virtual_machine,omitempty"` -} - -// PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses defines model for PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses. -type PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses struct { - Address *string `json:"address,omitempty"` - Id *string `json:"id,omitempty"` -} - -// PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork defines model for PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork. -type PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine defines model for PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine. -type PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// PostVirtualMachineReset200ResponseTask defines model for PostVirtualMachineReset200ResponseTask. -type PostVirtualMachineReset200ResponseTask struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Status *TaskStatusEnum `json:"status,omitempty"` -} - -// PostVirtualMachineShutdown200ResponseTask defines model for PostVirtualMachineShutdown200ResponseTask. -type PostVirtualMachineShutdown200ResponseTask struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Status *TaskStatusEnum `json:"status,omitempty"` -} - -// PostVirtualMachineStart200ResponseTask defines model for PostVirtualMachineStart200ResponseTask. -type PostVirtualMachineStart200ResponseTask struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Status *TaskStatusEnum `json:"status,omitempty"` -} - -// PostVirtualMachineStop200ResponseTask defines model for PostVirtualMachineStop200ResponseTask. -type PostVirtualMachineStop200ResponseTask struct { - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Status *TaskStatusEnum `json:"status,omitempty"` -} - -// PrivacyTypesEnum defines model for PrivacyTypesEnum. -type PrivacyTypesEnum string - -// RateLimitReached defines model for RateLimitReached. -type RateLimitReached struct { - // TotalPermitted The total number of requests per minute that are permitted - TotalPermitted *int `json:"total_permitted,omitempty"` -} - -// RateLimitReachedEnum defines model for RateLimitReachedEnum. -type RateLimitReachedEnum string - -// RecordContentAttributesForA defines model for RecordContentAttributesForA. -type RecordContentAttributesForA struct { - IpAddress *string `json:"ip_address"` -} - -// RecordContentAttributesForAAAA defines model for RecordContentAttributesForAAAA. -type RecordContentAttributesForAAAA struct { - IpAddress *string `json:"ip_address"` -} - -// RecordContentAttributesForALIAS defines model for RecordContentAttributesForALIAS. -type RecordContentAttributesForALIAS struct { - Hostname *string `json:"hostname"` -} - -// RecordContentAttributesForCAA defines model for RecordContentAttributesForCAA. -type RecordContentAttributesForCAA struct { - Flag *string `json:"flag"` - Tag *string `json:"tag"` - Value *string `json:"value"` -} - -// RecordContentAttributesForCNAME defines model for RecordContentAttributesForCNAME. -type RecordContentAttributesForCNAME struct { - Hostname *string `json:"hostname"` -} - -// RecordContentAttributesForIPS defines model for RecordContentAttributesForIPS. -type RecordContentAttributesForIPS struct { - IpAddresses *string `json:"ip_addresses"` -} - -// RecordContentAttributesForMX defines model for RecordContentAttributesForMX. -type RecordContentAttributesForMX struct { - Hostname *string `json:"hostname"` -} - -// RecordContentAttributesForNS defines model for RecordContentAttributesForNS. -type RecordContentAttributesForNS struct { - Hostname *string `json:"hostname"` -} - -// RecordContentAttributesForPTR defines model for RecordContentAttributesForPTR. -type RecordContentAttributesForPTR struct { - Hostname *string `json:"hostname"` -} - -// RecordContentAttributesForSRV defines model for RecordContentAttributesForSRV. -type RecordContentAttributesForSRV struct { - Port *string `json:"port"` - Target *string `json:"target"` - Weight *string `json:"weight"` -} - -// RecordContentAttributesForSSHFP defines model for RecordContentAttributesForSSHFP. -type RecordContentAttributesForSSHFP struct { - Algorithm *string `json:"algorithm"` - Fingerprint *string `json:"fingerprint"` - FingerprintType *string `json:"fingerprint_type"` -} - -// RecordContentAttributesForTXT defines model for RecordContentAttributesForTXT. -type RecordContentAttributesForTXT struct { - Content *string `json:"content"` -} - -// RecordContentAttributesForVirtualMachine defines model for RecordContentAttributesForVirtualMachine. -type RecordContentAttributesForVirtualMachine struct { - VirtualMachine *string `json:"virtual_machine"` -} - -// ResourceCreationRestricted defines model for ResourceCreationRestricted. -type ResourceCreationRestricted struct { - Errors *[]string `json:"errors,omitempty"` -} - -// ResourceCreationRestrictedEnum defines model for ResourceCreationRestrictedEnum. -type ResourceCreationRestrictedEnum string - -// ResourceCreationRestrictedSchema The organization chosen is not permitted to create resources -type ResourceCreationRestrictedSchema struct { - Code *ResourceCreationRestrictedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *ResourceCreationRestricted `json:"detail,omitempty"` -} - -// ResourceDoesNotSupportUnallocationEnum defines model for ResourceDoesNotSupportUnallocationEnum. -type ResourceDoesNotSupportUnallocationEnum string - -// SSHKeyNotFoundEnum defines model for SSHKeyNotFoundEnum. -type SSHKeyNotFoundEnum string - -// Schedule defines model for Schedule. -type Schedule struct { - Frequency *int `json:"frequency,omitempty"` - Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` - Minute *int `json:"minute,omitempty"` - NextInvocationAt *int `json:"next_invocation_at,omitempty"` - Time *int `json:"time,omitempty"` -} - -// ScheduleArguments All 'schedule[]' params are mutually exclusive, only one can be provided. -type ScheduleArguments struct { - Frequency *int `json:"frequency,omitempty"` - Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` - Minute *int `json:"minute,omitempty"` - Time *int `json:"time,omitempty"` -} - -// ScheduleIntervalTypeEnum defines model for ScheduleIntervalTypeEnum. -type ScheduleIntervalTypeEnum string - -// ScopeNotGrantedError defines model for ScopeNotGrantedError. -type ScopeNotGrantedError struct { - Scopes *[]string `json:"scopes,omitempty"` -} - -// ScopeNotGrantedErrorEnum defines model for ScopeNotGrantedErrorEnum. -type ScopeNotGrantedErrorEnum string - -// ScopeNotGrantedErrorSchema The scope required for this endpoint has not been granted to the authenticating identity -type ScopeNotGrantedErrorSchema struct { - Code *ScopeNotGrantedErrorEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *ScopeNotGrantedError `json:"detail,omitempty"` -} - -// SecurityGroup defines model for SecurityGroup. -type SecurityGroup struct { - AllowAllInbound *bool `json:"allow_all_inbound,omitempty"` - AllowAllOutbound *bool `json:"allow_all_outbound,omitempty"` - Associations *[]string `json:"associations,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// SecurityGroupArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type SecurityGroupArguments struct { - AllowAllInbound *bool `json:"allow_all_inbound,omitempty"` - AllowAllOutbound *bool `json:"allow_all_outbound,omitempty"` - Associations *[]string `json:"associations,omitempty"` - Name *string `json:"name,omitempty"` -} - -// SecurityGroupLookup All 'security_group[]' params are mutually exclusive, only one can be provided. -type SecurityGroupLookup struct { - Id *string `json:"id,omitempty"` -} - -// SecurityGroupNotFoundEnum defines model for SecurityGroupNotFoundEnum. -type SecurityGroupNotFoundEnum string - -// SecurityGroupRuleActionEnum defines model for SecurityGroupRuleActionEnum. -type SecurityGroupRuleActionEnum string - -// SecurityGroupRuleArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type SecurityGroupRuleArguments struct { - Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` - Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` - Notes *string `json:"notes,omitempty"` - - // Ports Either single port (ie. 80), multi-port (ie. 80,443) or range (ie. 2000-3000). - Ports *string `json:"ports,omitempty"` - Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` - Targets *[]string `json:"targets,omitempty"` -} - -// SecurityGroupRuleDirectionEnum defines model for SecurityGroupRuleDirectionEnum. -type SecurityGroupRuleDirectionEnum string - -// SecurityGroupRuleLookup All 'security_group_rule[]' params are mutually exclusive, only one can be provided. -type SecurityGroupRuleLookup struct { - Id *string `json:"id,omitempty"` -} - -// SecurityGroupRuleNotFoundEnum defines model for SecurityGroupRuleNotFoundEnum. -type SecurityGroupRuleNotFoundEnum string - -// SecurityGroupRuleProtocolEnum defines model for SecurityGroupRuleProtocolEnum. -type SecurityGroupRuleProtocolEnum string - -// SpeedProfileAlreadyAssignedEnum defines model for SpeedProfileAlreadyAssignedEnum. -type SpeedProfileAlreadyAssignedEnum string - -// StorageSpeedEnum defines model for StorageSpeedEnum. -type StorageSpeedEnum string - -// Tag defines model for Tag. -type Tag struct { - Color *TagColorsEnum `json:"color,omitempty"` - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` -} - -// TagArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type TagArguments struct { - Color *TagColorsEnum `json:"color,omitempty"` - Name *string `json:"name,omitempty"` -} - -// TagColorsEnum defines model for TagColorsEnum. -type TagColorsEnum string - -// TagLookup All 'tag[]' params are mutually exclusive, only one can be provided. -type TagLookup struct { - Id *string `json:"id,omitempty"` -} - -// TagNotFoundEnum defines model for TagNotFoundEnum. -type TagNotFoundEnum string - -// Task defines model for Task. -type Task struct { - CreatedAt *int `json:"created_at,omitempty"` - FinishedAt *int `json:"finished_at"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Progress *int `json:"progress,omitempty"` - StartedAt *int `json:"started_at"` - Status *TaskStatusEnum `json:"status,omitempty"` -} - -// TaskNotFoundEnum defines model for TaskNotFoundEnum. -type TaskNotFoundEnum string - -// TaskQueueingError defines model for TaskQueueingError. -type TaskQueueingError struct { - Details *string `json:"details,omitempty"` -} - -// TaskQueueingErrorEnum defines model for TaskQueueingErrorEnum. -type TaskQueueingErrorEnum string - -// TaskQueueingErrorSchema This error means that a background task that was needed to complete your request could not be queued -type TaskQueueingErrorSchema struct { - Code *TaskQueueingErrorEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *TaskQueueingError `json:"detail,omitempty"` -} - -// TaskStatusEnum defines model for TaskStatusEnum. -type TaskStatusEnum string - -// TemplateSpec defines model for TemplateSpec. -type TemplateSpec struct { - Fields *[]TemplateSpecField `json:"fields,omitempty"` -} - -// TemplateSpecField defines model for TemplateSpecField. -type TemplateSpecField struct { - Description *string `json:"description"` - Label *string `json:"label,omitempty"` - Name *string `json:"name,omitempty"` - Placeholder *string `json:"placeholder"` - Prefill *string `json:"prefill"` - Required *bool `json:"required,omitempty"` - Type *TemplateSpecFieldTypeEnum `json:"type,omitempty"` -} - -// TemplateSpecFieldTypeEnum defines model for TemplateSpecFieldTypeEnum. -type TemplateSpecFieldTypeEnum string - -// TrashObject defines model for TrashObject. -type TrashObject struct { - Id *string `json:"id,omitempty"` - KeepUntil *int `json:"keep_until,omitempty"` - ObjectId *string `json:"object_id,omitempty"` - ObjectType *string `json:"object_type,omitempty"` -} - -// TrashObjectLookup All 'trash_object[]' params are mutually exclusive, only one can be provided. -type TrashObjectLookup struct { - Id *string `json:"id,omitempty"` - ObjectId *string `json:"object_id,omitempty"` -} - -// TrashObjectNotFoundEnum defines model for TrashObjectNotFoundEnum. -type TrashObjectNotFoundEnum string - -// UnauthorizedNetworkForAPIToken defines model for UnauthorizedNetworkForAPIToken. -type UnauthorizedNetworkForAPIToken struct { - // IpAddress The IP address the request was received from - IpAddress *string `json:"ip_address,omitempty"` -} - -// UnauthorizedNetworkForAPITokenEnum defines model for UnauthorizedNetworkForAPITokenEnum. -type UnauthorizedNetworkForAPITokenEnum string - -// UnauthorizedNetworkForAPITokenSchema Network is not allowed to access the API with this API token -type UnauthorizedNetworkForAPITokenSchema struct { - Code *UnauthorizedNetworkForAPITokenEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *UnauthorizedNetworkForAPIToken `json:"detail,omitempty"` -} - -// User defines model for User. -type User struct { - AvatarUrl *string `json:"avatar_url,omitempty"` - FirstName *string `json:"first_name,omitempty"` - Id *string `json:"id,omitempty"` - LastName *string `json:"last_name,omitempty"` -} - -// ValidationError defines model for ValidationError. -type ValidationError struct { - Errors *[]string `json:"errors,omitempty"` -} - -// ValidationErrorEnum defines model for ValidationErrorEnum. -type ValidationErrorEnum string - -// ValidationErrorSchema A validation error occurred with the object that was being created/updated/deleted -type ValidationErrorSchema struct { - Code *ValidationErrorEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *ValidationError `json:"detail,omitempty"` -} - -// VirtualMachine defines model for VirtualMachine. -type VirtualMachine struct { - AttachedIso *ISO `json:"attached_iso"` - CpuCores *int `json:"cpu_cores"` - CreatedAt *int `json:"created_at,omitempty"` - Description *string `json:"description"` - Fqdn *string `json:"fqdn,omitempty"` - GpuType *GPUType `json:"gpu_type"` - Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` - Group *VirtualMachineGroup `json:"group"` - Hostname *string `json:"hostname,omitempty"` - Id *string `json:"id,omitempty"` - InitialRootPassword *string `json:"initial_root_password"` - IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` - MemoryInGb *int `json:"memory_in_gb"` - Name *string `json:"name,omitempty"` - Organization *Organization `json:"organization,omitempty"` - Package *VirtualMachinePackage `json:"package"` - State *VirtualMachineStateEnum `json:"state,omitempty"` - TagNames *[]string `json:"tag_names,omitempty"` - Tags *[]Tag `json:"tags,omitempty"` - UseDedicatedCpus *bool `json:"use_dedicated_cpus"` - Zone *Zone `json:"zone,omitempty"` -} - -// VirtualMachineArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type VirtualMachineArguments struct { - Description *string `json:"description,omitempty"` - - // GpuType All 'gpu_type[]' params are mutually exclusive, only one can be provided. - GpuType *GPUTypeLookup `json:"gpu_type,omitempty"` - - // Group All 'group[]' params are mutually exclusive, only one can be provided. - Group *VirtualMachineGroupLookup `json:"group,omitempty"` - Hostname *string `json:"hostname,omitempty"` - Name *string `json:"name,omitempty"` - TagNames *[]string `json:"tag_names,omitempty"` -} - -// VirtualMachineBuildNotFoundEnum defines model for VirtualMachineBuildNotFoundEnum. -type VirtualMachineBuildNotFoundEnum string - -// VirtualMachineBuildStateEnum defines model for VirtualMachineBuildStateEnum. -type VirtualMachineBuildStateEnum string - -// VirtualMachineDisk defines model for VirtualMachineDisk. -type VirtualMachineDisk struct { - AttachOnBoot *bool `json:"attach_on_boot,omitempty"` - Boot *bool `json:"boot,omitempty"` - Disk *Disk `json:"disk,omitempty"` - State *VirtualMachineDiskAttachmentStateEnum `json:"state,omitempty"` - VirtualMachine *VirtualMachine `json:"virtual_machine,omitempty"` -} - -// VirtualMachineDiskAttachmentStateEnum defines model for VirtualMachineDiskAttachmentStateEnum. -type VirtualMachineDiskAttachmentStateEnum string - -// VirtualMachineFlexibleResources All 'resources[]' params are mutually exclusive, only one can be provided. -type VirtualMachineFlexibleResources struct { - CpuCores int `json:"cpu_cores"` - MemoryInGb int `json:"memory_in_gb"` - UseDedicatedCpus *bool `json:"use_dedicated_cpus,omitempty"` -} - -// VirtualMachineGPU defines model for VirtualMachineGPU. -type VirtualMachineGPU struct { - // Available When pending action is "attach", this indicates if there is a GPU of the relevant type available. - Available *bool `json:"available,omitempty"` - - // Id Unique ID for this GPU. Not available when status is "detached". - Id *string `json:"id"` - PendingAction *VirtualMachineGPUPendingActionEnum `json:"pending_action"` - Status *VirtualMachineGPUStatusEnum `json:"status,omitempty"` - Type *GPUType `json:"type,omitempty"` -} - -// VirtualMachineGPUPendingActionEnum defines model for VirtualMachineGPUPendingActionEnum. -type VirtualMachineGPUPendingActionEnum string - -// VirtualMachineGPUStatusEnum defines model for VirtualMachineGPUStatusEnum. -type VirtualMachineGPUStatusEnum string - -// VirtualMachineGroup defines model for VirtualMachineGroup. -type VirtualMachineGroup struct { - AutoSegregate *bool `json:"auto_segregate,omitempty"` - CreatedAt *int `json:"created_at,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Segregate *bool `json:"segregate,omitempty"` -} - -// VirtualMachineGroupArguments All 'properties[]' params are mutually exclusive, only one can be provided. -type VirtualMachineGroupArguments struct { - AutoSegregate *bool `json:"auto_segregate,omitempty"` - Name *string `json:"name,omitempty"` - Segregate *bool `json:"segregate,omitempty"` -} - -// VirtualMachineGroupLookup All 'group[]' params are mutually exclusive, only one can be provided. -type VirtualMachineGroupLookup struct { - Id *string `json:"id,omitempty"` -} - -// VirtualMachineGroupNotFoundEnum defines model for VirtualMachineGroupNotFoundEnum. -type VirtualMachineGroupNotFoundEnum string - -// VirtualMachineLookup All 'virtual_machine[]' params are mutually exclusive, only one can be provided. -type VirtualMachineLookup struct { - Fqdn *string `json:"fqdn,omitempty"` - Id *string `json:"id,omitempty"` -} - -// VirtualMachineMustBeStarted defines model for VirtualMachineMustBeStarted. -type VirtualMachineMustBeStarted struct { - CurrentState *string `json:"current_state,omitempty"` -} - -// VirtualMachineMustBeStartedEnum defines model for VirtualMachineMustBeStartedEnum. -type VirtualMachineMustBeStartedEnum string - -// VirtualMachineMustBeStartedSchema Virtual machines must be in a started state to create console sessions -type VirtualMachineMustBeStartedSchema struct { - Code *VirtualMachineMustBeStartedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *VirtualMachineMustBeStarted `json:"detail,omitempty"` -} - -// VirtualMachineNetworkInterfaceLookup All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. -type VirtualMachineNetworkInterfaceLookup struct { - Id *string `json:"id,omitempty"` -} - -// VirtualMachineNetworkInterfaceNotFoundEnum defines model for VirtualMachineNetworkInterfaceNotFoundEnum. -type VirtualMachineNetworkInterfaceNotFoundEnum string - -// VirtualMachineNetworkInterfaceNotFoundSchema No network interface was found matching any of the criteria provided in the arguments -type VirtualMachineNetworkInterfaceNotFoundSchema struct { - Code *VirtualMachineNetworkInterfaceNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// VirtualMachineNotFoundEnum defines model for VirtualMachineNotFoundEnum. -type VirtualMachineNotFoundEnum string - -// VirtualMachineNotFoundSchema No virtual machine was found matching any of the criteria provided in the arguments -type VirtualMachineNotFoundSchema struct { - Code *VirtualMachineNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// VirtualMachinePackage defines model for VirtualMachinePackage. -type VirtualMachinePackage struct { - CpuCores *int `json:"cpu_cores,omitempty"` - Icon *Attachment `json:"icon"` - Id *string `json:"id,omitempty"` - Ipv4Addresses *int `json:"ipv4_addresses,omitempty"` - MemoryInGb *int `json:"memory_in_gb,omitempty"` - MonthlyBandwidthAllowanceInGb *int `json:"monthly_bandwidth_allowance_in_gb"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink,omitempty"` - Privacy *PrivacyTypesEnum `json:"privacy,omitempty"` - StorageInGb *int `json:"storage_in_gb,omitempty"` - UseDedicatedCpus *bool `json:"use_dedicated_cpus,omitempty"` -} - -// VirtualMachinePackageLookup All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. -type VirtualMachinePackageLookup struct { - Id *string `json:"id,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// VirtualMachinePackageNotFoundEnum defines model for VirtualMachinePackageNotFoundEnum. -type VirtualMachinePackageNotFoundEnum string - -// VirtualMachinePackageNotFoundSchema No package was found matching any of the criteria provided in the arguments -type VirtualMachinePackageNotFoundSchema struct { - Code *VirtualMachinePackageNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// VirtualMachineStateEnum defines model for VirtualMachineStateEnum. -type VirtualMachineStateEnum string - -// Zone defines model for Zone. -type Zone struct { - DataCenter *DataCenter `json:"data_center,omitempty"` - Id *string `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Permalink *string `json:"permalink"` -} - -// ZoneLookup All 'zone[]' params are mutually exclusive, only one can be provided. -type ZoneLookup struct { - Id *string `json:"id,omitempty"` - Permalink *string `json:"permalink,omitempty"` -} - -// ZoneNotFoundEnum defines model for ZoneNotFoundEnum. -type ZoneNotFoundEnum string - -// ZoneNotFoundSchema No zone was found matching any of the criteria provided in the arguments -type ZoneNotFoundSchema struct { - Code *ZoneNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// APIAuthenticator400Response defines model for APIAuthenticator400Response. -type APIAuthenticator400Response struct { - Code *MissingAPITokenEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// APIAuthenticator403Response defines model for APIAuthenticator403Response. -type APIAuthenticator403Response = OneOfAPIAuthenticator403Response - -// APIAuthenticator429Response defines model for APIAuthenticator429Response. -type APIAuthenticator429Response struct { - Code *RateLimitReachedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *RateLimitReached `json:"detail,omitempty"` -} - -// CertificateNotFoundResponse defines model for CertificateNotFoundResponse. -type CertificateNotFoundResponse struct { - Code *CertificateNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// CountryNotFoundResponse defines model for CountryNotFoundResponse. -type CountryNotFoundResponse struct { - Code *CountryNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// CountryStateNotFoundResponse defines model for CountryStateNotFoundResponse. -type CountryStateNotFoundResponse struct { - Code *CountryStateNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// CurrencyNotFoundResponse defines model for CurrencyNotFoundResponse. -type CurrencyNotFoundResponse struct { - Code *CurrencyNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DNSRecordNotFoundResponse defines model for DNSRecordNotFoundResponse. -type DNSRecordNotFoundResponse struct { - Code *DNSRecordNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DNSZoneNotFoundResponse defines model for DNSZoneNotFoundResponse. -type DNSZoneNotFoundResponse struct { - Code *DNSZoneNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DNSZoneNotVerifiedResponse defines model for DNSZoneNotVerifiedResponse. -type DNSZoneNotVerifiedResponse struct { - Code *DNSZoneNotVerifiedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DataCenterNotFoundResponse defines model for DataCenterNotFoundResponse. -type DataCenterNotFoundResponse struct { - Code *DataCenterNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res defines model for DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res. -type DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res = OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res - -// DeletionRestrictedResponse defines model for DeletionRestrictedResponse. -type DeletionRestrictedResponse struct { - Code *DeletionRestrictedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *DeletionRestricted `json:"detail,omitempty"` -} - -// DiskBackupPolicyNotFoundResponse defines model for DiskBackupPolicyNotFoundResponse. -type DiskBackupPolicyNotFoundResponse struct { - Code *DiskBackupPolicyNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DiskNotFoundResponse defines model for DiskNotFoundResponse. -type DiskNotFoundResponse struct { - Code *DiskNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DiskTemplateNotFoundResponse defines model for DiskTemplateNotFoundResponse. -type DiskTemplateNotFoundResponse struct { - Code *DiskTemplateNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// DiskTemplateVersionNotFoundResponse defines model for DiskTemplateVersionNotFoundResponse. -type DiskTemplateVersionNotFoundResponse struct { - Code *DiskTemplateVersionNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// FileStorageVolumeNotFoundResponse defines model for FileStorageVolumeNotFoundResponse. -type FileStorageVolumeNotFoundResponse struct { - Code *FileStorageVolumeNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res defines model for FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res. -type FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res = OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res - -// GPUTypeNotFoundResponse defines model for GPUTypeNotFoundResponse. -type GPUTypeNotFoundResponse struct { - Code *GPUTypeNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// IPAddressNotFoundResponse defines model for IPAddressNotFoundResponse. -type IPAddressNotFoundResponse struct { - Code *IPAddressNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res. -type IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res = OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res - -// IPAddressNotFoundVirtualMachineNotFound404Res defines model for IPAddressNotFoundVirtualMachineNotFound404Res. -type IPAddressNotFoundVirtualMachineNotFound404Res = OneOfIPAddressNotFoundVirtualMachineNotFound404Res - -// IPAlreadyAllocatedInvalidIP422Res defines model for IPAlreadyAllocatedInvalidIP422Res. -type IPAlreadyAllocatedInvalidIP422Res = OneOfIPAlreadyAllocatedInvalidIP422Res - -// IPAlreadyAllocatedNoInterfaceAvailable422Res defines model for IPAlreadyAllocatedNoInterfaceAvailable422Res. -type IPAlreadyAllocatedNoInterfaceAvailable422Res = OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res - -// IdentityNotLinkedToWebSession400Res defines model for IdentityNotLinkedToWebSession400Res. -type IdentityNotLinkedToWebSession400Res = OneOfIdentityNotLinkedToWebSession400Res - -// InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res defines model for InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res. -type InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res = OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res - -// InvalidSpecXML400Res defines model for InvalidSpecXML400Res. -type InvalidSpecXML400Res = OneOfInvalidSpecXML400Res - -// InvalidTimestamp400Res defines model for InvalidTimestamp400Res. -type InvalidTimestamp400Res = OneOfInvalidTimestamp400Res - -// LoadBalancerNotFoundResponse defines model for LoadBalancerNotFoundResponse. -type LoadBalancerNotFoundResponse struct { - Code *LoadBalancerNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// LoadBalancerRuleNotFoundResponse defines model for LoadBalancerRuleNotFoundResponse. -type LoadBalancerRuleNotFoundResponse struct { - Code *LoadBalancerRuleNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// LocationRequiredValidationError422Res defines model for LocationRequiredValidationError422Res. -type LocationRequiredValidationError422Res = OneOfLocationRequiredValidationError422Res - -// NetworkNotFoundOrganizationNotFound404Res defines model for NetworkNotFoundOrganizationNotFound404Res. -type NetworkNotFoundOrganizationNotFound404Res = OneOfNetworkNotFoundOrganizationNotFound404Res - -// NetworkNotFoundResponse defines model for NetworkNotFoundResponse. -type NetworkNotFoundResponse struct { - Code *NetworkNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res. -type NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res = OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res - -// NoAllocationResponse defines model for NoAllocationResponse. -type NoAllocationResponse struct { - Code *NoAllocationEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// NoAvailableAddressesResponse defines model for NoAvailableAddressesResponse. -type NoAvailableAddressesResponse struct { - Code *NoAvailableAddressesEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// NoUserAssociatedWithIdentityResponse defines model for NoUserAssociatedWithIdentityResponse. -type NoUserAssociatedWithIdentityResponse struct { - Code *NoUserAssociatedWithIdentityEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// ObjectInTrashResponse defines model for ObjectInTrashResponse. -type ObjectInTrashResponse struct { - Code *ObjectInTrashEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *ObjectInTrash `json:"detail,omitempty"` -} - -// ObjectInTrashTaskQueueingError406Res defines model for ObjectInTrashTaskQueueingError406Res. -type ObjectInTrashTaskQueueingError406Res = OneOfObjectInTrashTaskQueueingError406Res - -// ObjectInTrashVirtualMachineMustBeStarted406Res defines model for ObjectInTrashVirtualMachineMustBeStarted406Res. -type ObjectInTrashVirtualMachineMustBeStarted406Res = OneOfObjectInTrashVirtualMachineMustBeStarted406Res - -// OperatingSystemNotFoundOrganizationNotFound404Res defines model for OperatingSystemNotFoundOrganizationNotFound404Res. -type OperatingSystemNotFoundOrganizationNotFound404Res = OneOfOperatingSystemNotFoundOrganizationNotFound404Res - -// OperatingSystemNotFoundResponse defines model for OperatingSystemNotFoundResponse. -type OperatingSystemNotFoundResponse struct { - Code *OperatingSystemNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// OrganizationLimitReachedValidationError422Res defines model for OrganizationLimitReachedValidationError422Res. -type OrganizationLimitReachedValidationError422Res = OneOfOrganizationLimitReachedValidationError422Res - -// OrganizationNotActivatedOrganizationSuspended403Res defines model for OrganizationNotActivatedOrganizationSuspended403Res. -type OrganizationNotActivatedOrganizationSuspended403Res = OneOfOrganizationNotActivatedOrganizationSuspended403Res - -// OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res defines model for OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res. -type OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res = OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - -// OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res defines model for OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res. -type OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res = OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - -// OrganizationNotFoundResponse defines model for OrganizationNotFoundResponse. -type OrganizationNotFoundResponse struct { - Code *OrganizationNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// PermissionDenied403Res defines model for PermissionDenied403Res. -type PermissionDenied403Res = OneOfPermissionDenied403Res - -// ResourceDoesNotSupportUnallocationResponse defines model for ResourceDoesNotSupportUnallocationResponse. -type ResourceDoesNotSupportUnallocationResponse struct { - Code *ResourceDoesNotSupportUnallocationEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// SSHKeyNotFoundResponse defines model for SSHKeyNotFoundResponse. -type SSHKeyNotFoundResponse struct { - Code *SSHKeyNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// SecurityGroupNotFoundResponse defines model for SecurityGroupNotFoundResponse. -type SecurityGroupNotFoundResponse struct { - Code *SecurityGroupNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// SecurityGroupRuleNotFoundResponse defines model for SecurityGroupRuleNotFoundResponse. -type SecurityGroupRuleNotFoundResponse struct { - Code *SecurityGroupRuleNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// SpeedProfileAlreadyAssignedResponse defines model for SpeedProfileAlreadyAssignedResponse. -type SpeedProfileAlreadyAssignedResponse struct { - Code *SpeedProfileAlreadyAssignedEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// TagNotFoundResponse defines model for TagNotFoundResponse. -type TagNotFoundResponse struct { - Code *TagNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// TaskNotFoundResponse defines model for TaskNotFoundResponse. -type TaskNotFoundResponse struct { - Code *TaskNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// TaskQueueingErrorResponse defines model for TaskQueueingErrorResponse. -type TaskQueueingErrorResponse struct { - Code *TaskQueueingErrorEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *TaskQueueingError `json:"detail,omitempty"` -} - -// TrashObjectNotFoundResponse defines model for TrashObjectNotFoundResponse. -type TrashObjectNotFoundResponse struct { - Code *TrashObjectNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// ValidationErrorResponse defines model for ValidationErrorResponse. -type ValidationErrorResponse struct { - Code *ValidationErrorEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *ValidationError `json:"detail,omitempty"` -} - -// VirtualMachineBuildNotFoundResponse defines model for VirtualMachineBuildNotFoundResponse. -type VirtualMachineBuildNotFoundResponse struct { - Code *VirtualMachineBuildNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// VirtualMachineGroupNotFoundResponse defines model for VirtualMachineGroupNotFoundResponse. -type VirtualMachineGroupNotFoundResponse struct { - Code *VirtualMachineGroupNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// VirtualMachineNetworkInterfaceNotFoundResponse defines model for VirtualMachineNetworkInterfaceNotFoundResponse. -type VirtualMachineNetworkInterfaceNotFoundResponse struct { - Code *VirtualMachineNetworkInterfaceNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// VirtualMachineNotFoundResponse defines model for VirtualMachineNotFoundResponse. -type VirtualMachineNotFoundResponse struct { - Code *VirtualMachineNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// VirtualMachineNotFoundVirtualMachinePackageNotFound404Res defines model for VirtualMachineNotFoundVirtualMachinePackageNotFound404Res. -type VirtualMachineNotFoundVirtualMachinePackageNotFound404Res = OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res - -// VirtualMachinePackageNotFoundResponse defines model for VirtualMachinePackageNotFoundResponse. -type VirtualMachinePackageNotFoundResponse struct { - Code *VirtualMachinePackageNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// ZoneNotFoundResponse defines model for ZoneNotFoundResponse. -type ZoneNotFoundResponse struct { - Code *ZoneNotFoundEnum `json:"code,omitempty"` - Description *string `json:"description,omitempty"` - Detail *map[string]interface{} `json:"detail,omitempty"` -} - -// GetCertificateParams defines parameters for GetCertificate. -type GetCertificateParams struct { - // CertificateId All 'certificate[]' params are mutually exclusive, only one can be provided. - CertificateId *string `form:"certificate[id],omitempty" json:"certificate[id],omitempty"` -} - -// GetCountriesParams defines parameters for GetCountries. -type GetCountriesParams struct { - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetCountryParams defines parameters for GetCountry. -type GetCountryParams struct { - // CountryId The country to return. All 'country[]' params are mutually exclusive, only one can be provided. - CountryId *string `form:"country[id],omitempty" json:"country[id],omitempty"` - - // CountryIsoCode2 The country to return. All 'country[]' params are mutually exclusive, only one can be provided. - CountryIsoCode2 *string `form:"country[iso_code2],omitempty" json:"country[iso_code2],omitempty"` - - // CountryIsoCode3 The country to return. All 'country[]' params are mutually exclusive, only one can be provided. - CountryIsoCode3 *string `form:"country[iso_code3],omitempty" json:"country[iso_code3],omitempty"` -} - -// GetCountryCountryStatesParams defines parameters for GetCountryCountryStates. -type GetCountryCountryStatesParams struct { - // CountryId The country to return states for. All 'country[]' params are mutually exclusive, only one can be provided. - CountryId *string `form:"country[id],omitempty" json:"country[id],omitempty"` - - // CountryIsoCode2 The country to return states for. All 'country[]' params are mutually exclusive, only one can be provided. - CountryIsoCode2 *string `form:"country[iso_code2],omitempty" json:"country[iso_code2],omitempty"` - - // CountryIsoCode3 The country to return states for. All 'country[]' params are mutually exclusive, only one can be provided. - CountryIsoCode3 *string `form:"country[iso_code3],omitempty" json:"country[iso_code3],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetCountryStateParams defines parameters for GetCountryState. -type GetCountryStateParams struct { - // CountryStateId The country state to return. All 'country_state[]' params are mutually exclusive, only one can be provided. - CountryStateId *string `form:"country_state[id],omitempty" json:"country_state[id],omitempty"` -} - -// GetCurrenciesParams defines parameters for GetCurrencies. -type GetCurrenciesParams struct { - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetCurrencyParams defines parameters for GetCurrency. -type GetCurrencyParams struct { - // CurrencyId The currency to return. All 'currency[]' params are mutually exclusive, only one can be provided. - CurrencyId *string `form:"currency[id],omitempty" json:"currency[id],omitempty"` - - // CurrencyIsoCode The currency to return. All 'currency[]' params are mutually exclusive, only one can be provided. - CurrencyIsoCode *string `form:"currency[iso_code],omitempty" json:"currency[iso_code],omitempty"` -} - -// GetDataCenterParams defines parameters for GetDataCenter. -type GetDataCenterParams struct { - // DataCenterId All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenterId *string `form:"data_center[id],omitempty" json:"data_center[id],omitempty"` - - // DataCenterPermalink All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenterPermalink *string `form:"data_center[permalink],omitempty" json:"data_center[permalink],omitempty"` -} - -// GetDataCenterDefaultNetworkParams defines parameters for GetDataCenterDefaultNetwork. -type GetDataCenterDefaultNetworkParams struct { - // DataCenterId All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenterId *string `form:"data_center[id],omitempty" json:"data_center[id],omitempty"` - - // DataCenterPermalink All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenterPermalink *string `form:"data_center[permalink],omitempty" json:"data_center[permalink],omitempty"` -} - -// GetDataCenterGpuTypesParams defines parameters for GetDataCenterGpuTypes. -type GetDataCenterGpuTypesParams struct { - // DataCenterId The data center to list GPU types for. All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenterId *string `form:"data_center[id],omitempty" json:"data_center[id],omitempty"` - - // DataCenterPermalink The data center to list GPU types for. All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenterPermalink *string `form:"data_center[permalink],omitempty" json:"data_center[permalink],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// DeleteDiskBackupPolicyJSONBody defines parameters for DeleteDiskBackupPolicy. -type DeleteDiskBackupPolicyJSONBody struct { - // DiskBackupPolicy All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. - DiskBackupPolicy DiskBackupPolicyLookup `json:"disk_backup_policy"` -} - -// GetDiskBackupPolicyParams defines parameters for GetDiskBackupPolicy. -type GetDiskBackupPolicyParams struct { - // DiskBackupPolicyId The disk backup policy to get information for. All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. - DiskBackupPolicyId *string `form:"disk_backup_policy[id],omitempty" json:"disk_backup_policy[id],omitempty"` -} - -// PatchDiskBackupPolicyJSONBody defines parameters for PatchDiskBackupPolicy. -type PatchDiskBackupPolicyJSONBody struct { - // DiskBackupPolicy All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. - DiskBackupPolicy DiskBackupPolicyLookup `json:"disk_backup_policy"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties DiskBackupPolicyArguments `json:"properties"` -} - -// DeleteDiskBackupPolicyScheduleJSONBody defines parameters for DeleteDiskBackupPolicySchedule. -type DeleteDiskBackupPolicyScheduleJSONBody struct { - // DiskBackupPolicy All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. - DiskBackupPolicy DiskBackupPolicyLookup `json:"disk_backup_policy"` - - // Timestamp The time the disk backup policy will be moved to the trash automatically. - Timestamp int `json:"timestamp"` -} - -// GetDiskTemplateVersionParams defines parameters for GetDiskTemplateVersion. -type GetDiskTemplateVersionParams struct { - // DiskTemplateVersionId The disk template version to return. All 'disk_template_version[]' params are mutually exclusive, only one can be provided. - DiskTemplateVersionId *string `form:"disk_template_version[id],omitempty" json:"disk_template_version[id],omitempty"` -} - -// GetDiskTemplateVersionSpecParams defines parameters for GetDiskTemplateVersionSpec. -type GetDiskTemplateVersionSpecParams struct { - // DiskTemplateVersionId The disk template version to return. All 'disk_template_version[]' params are mutually exclusive, only one can be provided. - DiskTemplateVersionId *string `form:"disk_template_version[id],omitempty" json:"disk_template_version[id],omitempty"` -} - -// GetDiskTemplateParams defines parameters for GetDiskTemplate. -type GetDiskTemplateParams struct { - // DiskTemplateId The disk template to return. All 'disk_template[]' params are mutually exclusive, only one can be provided. - DiskTemplateId *string `form:"disk_template[id],omitempty" json:"disk_template[id],omitempty"` - - // DiskTemplatePermalink The disk template to return. All 'disk_template[]' params are mutually exclusive, only one can be provided. - DiskTemplatePermalink *string `form:"disk_template[permalink],omitempty" json:"disk_template[permalink],omitempty"` -} - -// GetDiskTemplateVersionsParams defines parameters for GetDiskTemplateVersions. -type GetDiskTemplateVersionsParams struct { - // DiskTemplateId The disk template to return the versions for. All 'disk_template[]' params are mutually exclusive, only one can be provided. - DiskTemplateId *string `form:"disk_template[id],omitempty" json:"disk_template[id],omitempty"` - - // DiskTemplatePermalink The disk template to return the versions for. All 'disk_template[]' params are mutually exclusive, only one can be provided. - DiskTemplatePermalink *string `form:"disk_template[permalink],omitempty" json:"disk_template[permalink],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetDiskParams defines parameters for GetDisk. -type GetDiskParams struct { - // DiskId The disk to return. All 'disk[]' params are mutually exclusive, only one can be provided. - DiskId *string `form:"disk[id],omitempty" json:"disk[id],omitempty"` -} - -// GetDiskDiskBackupPoliciesParams defines parameters for GetDiskDiskBackupPolicies. -type GetDiskDiskBackupPoliciesParams struct { - // DiskId The disk to return disk backup policies for. All 'disk[]' params are mutually exclusive, only one can be provided. - DiskId *string `form:"disk[id],omitempty" json:"disk[id],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostDiskDiskBackupPoliciesJSONBody defines parameters for PostDiskDiskBackupPolicies. -type PostDiskDiskBackupPoliciesJSONBody struct { - // Disk All 'disk[]' params are mutually exclusive, only one can be provided. - Disk DiskLookup `json:"disk"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties DiskBackupPolicyArguments `json:"properties"` -} - -// DeleteDnsRecordJSONBody defines parameters for DeleteDnsRecord. -type DeleteDnsRecordJSONBody struct { - // DnsRecord All 'dns_record[]' params are mutually exclusive, only one can be provided. - DnsRecord DNSRecordLookup `json:"dns_record"` -} - -// GetDnsRecordParams defines parameters for GetDnsRecord. -type GetDnsRecordParams struct { - // DnsRecordId All 'dns_record[]' params are mutually exclusive, only one can be provided. - DnsRecordId *string `form:"dns_record[id],omitempty" json:"dns_record[id],omitempty"` -} - -// PatchDnsRecordJSONBody defines parameters for PatchDnsRecord. -type PatchDnsRecordJSONBody struct { - // DnsRecord All 'dns_record[]' params are mutually exclusive, only one can be provided. - DnsRecord DNSRecordLookup `json:"dns_record"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties DNSRecordArguments `json:"properties"` -} - -// DeleteDnsZoneJSONBody defines parameters for DeleteDnsZone. -type DeleteDnsZoneJSONBody struct { - // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZone DNSZoneLookup `json:"dns_zone"` -} - -// GetDnsZoneParams defines parameters for GetDnsZone. -type GetDnsZoneParams struct { - // DnsZoneId All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZoneId *string `form:"dns_zone[id],omitempty" json:"dns_zone[id],omitempty"` - - // DnsZoneName All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZoneName *string `form:"dns_zone[name],omitempty" json:"dns_zone[name],omitempty"` -} - -// PatchDnsZoneJSONBody defines parameters for PatchDnsZone. -type PatchDnsZoneJSONBody struct { - // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZone DNSZoneLookup `json:"dns_zone"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties DNSZoneArguments `json:"properties"` -} - -// GetDnsZoneRecordsParams defines parameters for GetDnsZoneRecords. -type GetDnsZoneRecordsParams struct { - // DnsZoneId All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZoneId *string `form:"dns_zone[id],omitempty" json:"dns_zone[id],omitempty"` - - // DnsZoneName All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZoneName *string `form:"dns_zone[name],omitempty" json:"dns_zone[name],omitempty"` -} - -// PostDnsZoneRecordsJSONBody defines parameters for PostDnsZoneRecords. -type PostDnsZoneRecordsJSONBody struct { - // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZone DNSZoneLookup `json:"dns_zone"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties DNSRecordArguments `json:"properties"` -} - -// PostDnsZoneVerifyJSONBody defines parameters for PostDnsZoneVerify. -type PostDnsZoneVerifyJSONBody struct { - // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. - DnsZone DNSZoneLookup `json:"dns_zone"` -} - -// DeleteFileStorageVolumeJSONBody defines parameters for DeleteFileStorageVolume. -type DeleteFileStorageVolumeJSONBody struct { - // FileStorageVolume All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. - FileStorageVolume FileStorageVolumeLookup `json:"file_storage_volume"` -} - -// GetFileStorageVolumeParams defines parameters for GetFileStorageVolume. -type GetFileStorageVolumeParams struct { - // FileStorageVolumeId The file storage volume to return. All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. - FileStorageVolumeId *string `form:"file_storage_volume[id],omitempty" json:"file_storage_volume[id],omitempty"` -} - -// PatchFileStorageVolumeJSONBody defines parameters for PatchFileStorageVolume. -type PatchFileStorageVolumeJSONBody struct { - // FileStorageVolume All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. - FileStorageVolume FileStorageVolumeLookup `json:"file_storage_volume"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties FileStorageVolumeArguments `json:"properties"` -} - -// GetGpuTypesParams defines parameters for GetGpuTypes. -type GetGpuTypesParams struct { - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetGpuTypeParams defines parameters for GetGpuType. -type GetGpuTypeParams struct { - // GpuTypeId All 'gpu_type[]' params are mutually exclusive, only one can be provided. - GpuTypeId *string `form:"gpu_type[id],omitempty" json:"gpu_type[id],omitempty"` - - // GpuTypePermalink All 'gpu_type[]' params are mutually exclusive, only one can be provided. - GpuTypePermalink *string `form:"gpu_type[permalink],omitempty" json:"gpu_type[permalink],omitempty"` -} - -// PostInvalidateLinkedWebSessionJSONBody defines parameters for PostInvalidateLinkedWebSession. -type PostInvalidateLinkedWebSessionJSONBody = interface{} - -// DeleteIpAddressJSONBody defines parameters for DeleteIpAddress. -type DeleteIpAddressJSONBody struct { - // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. - IpAddress IPAddressLookup `json:"ip_address"` -} - -// GetIpAddressParams defines parameters for GetIpAddress. -type GetIpAddressParams struct { - // IpAddressId The IP address to find. All 'ip_address[]' params are mutually exclusive, only one can be provided. - IpAddressId *string `form:"ip_address[id],omitempty" json:"ip_address[id],omitempty"` - - // IpAddressAddress The IP address to find. All 'ip_address[]' params are mutually exclusive, only one can be provided. - IpAddressAddress *string `form:"ip_address[address],omitempty" json:"ip_address[address],omitempty"` -} - -// PatchIpAddressJSONBody defines parameters for PatchIpAddress. -type PatchIpAddressJSONBody struct { - // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. - IpAddress IPAddressLookup `json:"ip_address"` - - // Label The label to give this address if setting it as a VIP - Label *string `json:"label,omitempty"` - - // ReverseDns The reverse DNS to set for this IP address - ReverseDns *string `json:"reverse_dns,omitempty"` - - // Vip Whether or not to set this address as a VIP - Vip *bool `json:"vip,omitempty"` -} - -// PostIpAddressUnallocateJSONBody defines parameters for PostIpAddressUnallocate. -type PostIpAddressUnallocateJSONBody struct { - // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. - IpAddress IPAddressLookup `json:"ip_address"` -} - -// DeleteLoadBalancerJSONBody defines parameters for DeleteLoadBalancer. -type DeleteLoadBalancerJSONBody struct { - // LoadBalancer All 'load_balancer[]' params are mutually exclusive, only one can be provided. - LoadBalancer LoadBalancerLookup `json:"load_balancer"` -} - -// GetLoadBalancerParams defines parameters for GetLoadBalancer. -type GetLoadBalancerParams struct { - // LoadBalancerId The load balancer to return the details for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. - LoadBalancerId *string `form:"load_balancer[id],omitempty" json:"load_balancer[id],omitempty"` - - // LoadBalancerApiReference The load balancer to return the details for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. - LoadBalancerApiReference *string `form:"load_balancer[api_reference],omitempty" json:"load_balancer[api_reference],omitempty"` -} - -// PatchLoadBalancerJSONBody defines parameters for PatchLoadBalancer. -type PatchLoadBalancerJSONBody struct { - // LoadBalancer All 'load_balancer[]' params are mutually exclusive, only one can be provided. - LoadBalancer LoadBalancerLookup `json:"load_balancer"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties LoadBalancerArguments `json:"properties"` -} - -// GetLoadBalancerRulesParams defines parameters for GetLoadBalancerRules. -type GetLoadBalancerRulesParams struct { - // LoadBalancerId The load balancer to return all load rules for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. - LoadBalancerId *string `form:"load_balancer[id],omitempty" json:"load_balancer[id],omitempty"` - - // LoadBalancerApiReference The load balancer to return all load rules for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. - LoadBalancerApiReference *string `form:"load_balancer[api_reference],omitempty" json:"load_balancer[api_reference],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostLoadBalancerRulesJSONBody defines parameters for PostLoadBalancerRules. -type PostLoadBalancerRulesJSONBody struct { - // LoadBalancer All 'load_balancer[]' params are mutually exclusive, only one can be provided. - LoadBalancer LoadBalancerLookup `json:"load_balancer"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties LoadBalancerRuleArguments `json:"properties"` -} - -// DeleteLoadBalancersRulesLoadBalancerRuleJSONBody defines parameters for DeleteLoadBalancersRulesLoadBalancerRule. -type DeleteLoadBalancersRulesLoadBalancerRuleJSONBody struct { - // LoadBalancerRule All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. - LoadBalancerRule LoadBalancerRuleLookup `json:"load_balancer_rule"` -} - -// GetLoadBalancersRulesLoadBalancerRuleParams defines parameters for GetLoadBalancersRulesLoadBalancerRule. -type GetLoadBalancersRulesLoadBalancerRuleParams struct { - // LoadBalancerRuleId The load balancer rule to return the details for. All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. - LoadBalancerRuleId *string `form:"load_balancer_rule[id],omitempty" json:"load_balancer_rule[id],omitempty"` -} - -// PatchLoadBalancersRulesLoadBalancerRuleJSONBody defines parameters for PatchLoadBalancersRulesLoadBalancerRule. -type PatchLoadBalancersRulesLoadBalancerRuleJSONBody struct { - // LoadBalancerRule All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. - LoadBalancerRule LoadBalancerRuleLookup `json:"load_balancer_rule"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties LoadBalancerRuleArguments `json:"properties"` -} - -// GetNetworkParams defines parameters for GetNetwork. -type GetNetworkParams struct { - // NetworkId The network to return. All 'network[]' params are mutually exclusive, only one can be provided. - NetworkId *string `form:"network[id],omitempty" json:"network[id],omitempty"` - - // NetworkPermalink The network to return. All 'network[]' params are mutually exclusive, only one can be provided. - NetworkPermalink *string `form:"network[permalink],omitempty" json:"network[permalink],omitempty"` -} - -// GetOperatingSystemsParams defines parameters for GetOperatingSystems. -type GetOperatingSystemsParams struct { - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetOperatingSystemParams defines parameters for GetOperatingSystem. -type GetOperatingSystemParams struct { - // OperatingSystemId The operating system to return. All 'operating_system[]' params are mutually exclusive, only one can be provided. - OperatingSystemId *string `form:"operating_system[id],omitempty" json:"operating_system[id],omitempty"` -} - -// GetOrganizationParams defines parameters for GetOrganization. -type GetOrganizationParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` -} - -// GetOrganizationAvailableNetworksParams defines parameters for GetOrganizationAvailableNetworks. -type GetOrganizationAvailableNetworksParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` -} - -// GetOrganizationCertificatesParams defines parameters for GetOrganizationCertificates. -type GetOrganizationCertificatesParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetOrganizationDiskBackupPoliciesParams defines parameters for GetOrganizationDiskBackupPolicies. -type GetOrganizationDiskBackupPoliciesParams struct { - // OrganizationId The organization to return disk backup policies for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to return disk backup policies for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetOrganizationDiskTemplatesParams defines parameters for GetOrganizationDiskTemplates. -type GetOrganizationDiskTemplatesParams struct { - // OrganizationId The organization to find disk templates for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to find disk templates for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - - // IncludeUniversal Whether or not to include universal templates - IncludeUniversal *bool `form:"include_universal,omitempty" json:"include_universal,omitempty"` - - // OperatingSystemId An operating system to use to filter disk templates. All 'operating_system[]' params are mutually exclusive, only one can be provided. - OperatingSystemId *string `form:"operating_system[id],omitempty" json:"operating_system[id],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetOrganizationDisksParams defines parameters for GetOrganizationDisks. -type GetOrganizationDisksParams struct { - // OrganizationId The organization to find disks for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to find disks for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetOrganizationDnsZonesParams defines parameters for GetOrganizationDnsZones. -type GetOrganizationDnsZonesParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationDnsZonesJSONBody defines parameters for PostOrganizationDnsZones. -type PostOrganizationDnsZonesJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties DNSZoneArguments `json:"properties"` -} - -// GetOrganizationDnsZonesNameserversParams defines parameters for GetOrganizationDnsZonesNameservers. -type GetOrganizationDnsZonesNameserversParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` -} - -// GetOrganizationFileStorageVolumesParams defines parameters for GetOrganizationFileStorageVolumes. -type GetOrganizationFileStorageVolumesParams struct { - // OrganizationId The organization to return all file storage volumes for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to return all file storage volumes for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationFileStorageVolumesJSONBody defines parameters for PostOrganizationFileStorageVolumes. -type PostOrganizationFileStorageVolumesJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties FileStorageVolumeArguments `json:"properties"` -} - -// GetOrganizationIpAddressesParams defines parameters for GetOrganizationIpAddresses. -type GetOrganizationIpAddressesParams struct { - // OrganizationId The organization to use when looking up IP addresses. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to use when looking up IP addresses. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - - // Allocated If true, only return allocated IP addresss. If false, only return unallocated IP addresses. - Allocated *bool `form:"allocated,omitempty" json:"allocated,omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationIpAddressesJSONBody defines parameters for PostOrganizationIpAddresses. -type PostOrganizationIpAddressesJSONBody struct { - // Label The label to give this address if setting it as a VIP - Label *string `json:"label,omitempty"` - - // Network All 'network[]' params are mutually exclusive, only one can be provided. - Network NetworkLookup `json:"network"` - - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - Version IPAddressVersionEnum `json:"version"` - - // Vip Whether or not to set this address as a VIP - Vip *bool `json:"vip,omitempty"` -} - -// GetOrganizationLoadBalancersParams defines parameters for GetOrganizationLoadBalancers. -type GetOrganizationLoadBalancersParams struct { - // OrganizationId The organization to return all load balancers for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to return all load balancers for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationLoadBalancersJSONBody defines parameters for PostOrganizationLoadBalancers. -type PostOrganizationLoadBalancersJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties LoadBalancerArguments `json:"properties"` -} - -// GetOrganizationManagedParams defines parameters for GetOrganizationManaged. -type GetOrganizationManagedParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationManagedJSONBody defines parameters for PostOrganizationManaged. -type PostOrganizationManagedJSONBody struct { - Name string `json:"name"` - - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - SubDomain string `json:"sub_domain"` -} - -// GetOrganizationNetworkSpeedProfilesParams defines parameters for GetOrganizationNetworkSpeedProfiles. -type GetOrganizationNetworkSpeedProfilesParams struct { - // OrganizationId The organization to use when looking up network speed profiles. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to use when looking up network speed profiles. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetOrganizationSecurityGroupsParams defines parameters for GetOrganizationSecurityGroups. -type GetOrganizationSecurityGroupsParams struct { - // OrganizationId The organization to return all security groups for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to return all security groups for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationSecurityGroupsJSONBody defines parameters for PostOrganizationSecurityGroups. -type PostOrganizationSecurityGroupsJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties SecurityGroupArguments `json:"properties"` -} - -// GetOrganizationSshKeysParams defines parameters for GetOrganizationSshKeys. -type GetOrganizationSshKeysParams struct { - // OrganizationId The organization to list SSH keys for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to list SSH keys for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationSshKeysJSONBody defines parameters for PostOrganizationSshKeys. -type PostOrganizationSshKeysJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // SshKey All 'ssh_key[]' params are mutually exclusive, only one can be provided. - SshKey AuthSSHKeyProperties `json:"ssh_key"` -} - -// GetOrganizationTagsParams defines parameters for GetOrganizationTags. -type GetOrganizationTagsParams struct { - // OrganizationId The organization to list the tags for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to list the tags for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationTagsJSONBody defines parameters for PostOrganizationTags. -type PostOrganizationTagsJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties TagArguments `json:"properties"` -} - -// GetOrganizationTrashObjectsParams defines parameters for GetOrganizationTrashObjects. -type GetOrganizationTrashObjectsParams struct { - // OrganizationId The organization to find all trash objects for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to find all trash objects for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationTrashObjectsPurgeAllJSONBody defines parameters for PostOrganizationTrashObjectsPurgeAll. -type PostOrganizationTrashObjectsPurgeAllJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` -} - -// GetOrganizationUsersWithAccessParams defines parameters for GetOrganizationUsersWithAccess. -type GetOrganizationUsersWithAccessParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetOrganizationVirtualMachineGroupsParams defines parameters for GetOrganizationVirtualMachineGroups. -type GetOrganizationVirtualMachineGroupsParams struct { - // OrganizationId The organization to return groups for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain The organization to return groups for. All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` -} - -// PostOrganizationVirtualMachineGroupsJSONBody defines parameters for PostOrganizationVirtualMachineGroups. -type PostOrganizationVirtualMachineGroupsJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties VirtualMachineGroupArguments `json:"properties"` -} - -// GetOrganizationVirtualMachinesParams defines parameters for GetOrganizationVirtualMachines. -type GetOrganizationVirtualMachinesParams struct { - // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostOrganizationVirtualMachinesBuildJSONBody defines parameters for PostOrganizationVirtualMachinesBuild. -type PostOrganizationVirtualMachinesBuildJSONBody struct { - // DataCenter All 'data_center[]' params are mutually exclusive, only one can be provided. - DataCenter *DataCenterLookup `json:"data_center,omitempty"` - - // DiskTemplate All 'disk_template[]' params are mutually exclusive, only one can be provided. - DiskTemplate *DiskTemplateLookup `json:"disk_template,omitempty"` - DiskTemplateOptions *[]KeyValue `json:"disk_template_options,omitempty"` - Hostname *string `json:"hostname,omitempty"` - - // Network All 'network[]' params are mutually exclusive, only one can be provided. - Network *NetworkLookup `json:"network,omitempty"` - - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - - // Package All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. - Package VirtualMachinePackageLookup `json:"package"` - - // Zone All 'zone[]' params are mutually exclusive, only one can be provided. - Zone *ZoneLookup `json:"zone,omitempty"` -} - -// PostOrganizationVirtualMachinesBuildFromSpecJSONBody defines parameters for PostOrganizationVirtualMachinesBuildFromSpec. -type PostOrganizationVirtualMachinesBuildFromSpecJSONBody struct { - // Organization All 'organization[]' params are mutually exclusive, only one can be provided. - Organization OrganizationLookup `json:"organization"` - Xml string `json:"xml"` -} - -// DeleteSecurityGroupJSONBody defines parameters for DeleteSecurityGroup. -type DeleteSecurityGroupJSONBody struct { - // SecurityGroup All 'security_group[]' params are mutually exclusive, only one can be provided. - SecurityGroup SecurityGroupLookup `json:"security_group"` -} - -// GetSecurityGroupParams defines parameters for GetSecurityGroup. -type GetSecurityGroupParams struct { - // SecurityGroupId The security group to return the details for. All 'security_group[]' params are mutually exclusive, only one can be provided. - SecurityGroupId *string `form:"security_group[id],omitempty" json:"security_group[id],omitempty"` -} - -// PatchSecurityGroupJSONBody defines parameters for PatchSecurityGroup. -type PatchSecurityGroupJSONBody struct { - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties SecurityGroupArguments `json:"properties"` - - // SecurityGroup All 'security_group[]' params are mutually exclusive, only one can be provided. - SecurityGroup SecurityGroupLookup `json:"security_group"` -} - -// GetSecurityGroupRulesParams defines parameters for GetSecurityGroupRules. -type GetSecurityGroupRulesParams struct { - // SecurityGroupId The security group to return all load rules for. All 'security_group[]' params are mutually exclusive, only one can be provided. - SecurityGroupId *string `form:"security_group[id],omitempty" json:"security_group[id],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostSecurityGroupRulesJSONBody defines parameters for PostSecurityGroupRules. -type PostSecurityGroupRulesJSONBody struct { - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties SecurityGroupRuleArguments `json:"properties"` - - // SecurityGroup All 'security_group[]' params are mutually exclusive, only one can be provided. - SecurityGroup SecurityGroupLookup `json:"security_group"` -} - -// DeleteSecurityGroupsRulesSecurityGroupRuleJSONBody defines parameters for DeleteSecurityGroupsRulesSecurityGroupRule. -type DeleteSecurityGroupsRulesSecurityGroupRuleJSONBody struct { - // SecurityGroupRule All 'security_group_rule[]' params are mutually exclusive, only one can be provided. - SecurityGroupRule SecurityGroupRuleLookup `json:"security_group_rule"` -} - -// GetSecurityGroupsRulesSecurityGroupRuleParams defines parameters for GetSecurityGroupsRulesSecurityGroupRule. -type GetSecurityGroupsRulesSecurityGroupRuleParams struct { - // SecurityGroupRuleId The security group rule to return the details for. All 'security_group_rule[]' params are mutually exclusive, only one can be provided. - SecurityGroupRuleId *string `form:"security_group_rule[id],omitempty" json:"security_group_rule[id],omitempty"` -} - -// PatchSecurityGroupsRulesSecurityGroupRuleJSONBody defines parameters for PatchSecurityGroupsRulesSecurityGroupRule. -type PatchSecurityGroupsRulesSecurityGroupRuleJSONBody struct { - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties SecurityGroupRuleArguments `json:"properties"` - - // SecurityGroupRule All 'security_group_rule[]' params are mutually exclusive, only one can be provided. - SecurityGroupRule SecurityGroupRuleLookup `json:"security_group_rule"` -} - -// DeleteSshKeyJSONBody defines parameters for DeleteSshKey. -type DeleteSshKeyJSONBody struct { - // SshKey All 'ssh_key[]' params are mutually exclusive, only one can be provided. - SshKey AuthSSHKeyLookup `json:"ssh_key"` -} - -// DeleteTagJSONBody defines parameters for DeleteTag. -type DeleteTagJSONBody struct { - // Tag All 'tag[]' params are mutually exclusive, only one can be provided. - Tag TagLookup `json:"tag"` -} - -// GetTagParams defines parameters for GetTag. -type GetTagParams struct { - // TagId The tag to load the details for. All 'tag[]' params are mutually exclusive, only one can be provided. - TagId *string `form:"tag[id],omitempty" json:"tag[id],omitempty"` -} - -// PatchTagJSONBody defines parameters for PatchTag. -type PatchTagJSONBody struct { - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties TagArguments `json:"properties"` - - // Tag All 'tag[]' params are mutually exclusive, only one can be provided. - Tag TagLookup `json:"tag"` -} - -// GetTaskParams defines parameters for GetTask. -type GetTaskParams struct { - // TaskId All 'task[]' params are mutually exclusive, only one can be provided. - TaskId *string `form:"task[id],omitempty" json:"task[id],omitempty"` -} - -// DeleteTrashObjectJSONBody defines parameters for DeleteTrashObject. -type DeleteTrashObjectJSONBody struct { - // TrashObject All 'trash_object[]' params are mutually exclusive, only one can be provided. - TrashObject TrashObjectLookup `json:"trash_object"` -} - -// GetTrashObjectParams defines parameters for GetTrashObject. -type GetTrashObjectParams struct { - // TrashObjectId The trash object to find. All 'trash_object[]' params are mutually exclusive, only one can be provided. - TrashObjectId *string `form:"trash_object[id],omitempty" json:"trash_object[id],omitempty"` - - // TrashObjectObjectId The trash object to find. All 'trash_object[]' params are mutually exclusive, only one can be provided. - TrashObjectObjectId *string `form:"trash_object[object_id],omitempty" json:"trash_object[object_id],omitempty"` -} - -// PostTrashObjectRestoreJSONBody defines parameters for PostTrashObjectRestore. -type PostTrashObjectRestoreJSONBody struct { - // TrashObject All 'trash_object[]' params are mutually exclusive, only one can be provided. - TrashObject TrashObjectLookup `json:"trash_object"` -} - -// DeleteVirtualMachineGroupJSONBody defines parameters for DeleteVirtualMachineGroup. -type DeleteVirtualMachineGroupJSONBody struct { - // VirtualMachineGroup All 'group[]' params are mutually exclusive, only one can be provided. - VirtualMachineGroup VirtualMachineGroupLookup `json:"virtual_machine_group"` -} - -// GetVirtualMachineGroupParams defines parameters for GetVirtualMachineGroup. -type GetVirtualMachineGroupParams struct { - // VirtualMachineGroupId The virtual machine group to retrieve. All 'virtual_machine_group[]' params are mutually exclusive, only one can be provided. - VirtualMachineGroupId *string `form:"virtual_machine_group[id],omitempty" json:"virtual_machine_group[id],omitempty"` -} - -// PatchVirtualMachineGroupJSONBody defines parameters for PatchVirtualMachineGroup. -type PatchVirtualMachineGroupJSONBody struct { - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties VirtualMachineGroupArguments `json:"properties"` - - // VirtualMachineGroup All 'group[]' params are mutually exclusive, only one can be provided. - VirtualMachineGroup VirtualMachineGroupLookup `json:"virtual_machine_group"` -} - -// GetVMNIVMNIParams defines parameters for GetVMNIVMNI. -type GetVMNIVMNIParams struct { - // VirtualMachineNetworkInterfaceId The network interface to show the information for. All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. - VirtualMachineNetworkInterfaceId *string `form:"virtual_machine_network_interface[id],omitempty" json:"virtual_machine_network_interface[id],omitempty"` -} - -// PostVirtualMachineNetworkInterfaceAllocateIpJSONBody defines parameters for PostVirtualMachineNetworkInterfaceAllocateIp. -type PostVirtualMachineNetworkInterfaceAllocateIpJSONBody struct { - // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. - IpAddress IPAddressLookup `json:"ip_address"` - - // VirtualMachineNetworkInterface All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. - VirtualMachineNetworkInterface VirtualMachineNetworkInterfaceLookup `json:"virtual_machine_network_interface"` -} - -// PostVirtualMachineNetworkInterfaceAllocateNewIpJSONBody defines parameters for PostVirtualMachineNetworkInterfaceAllocateNewIp. -type PostVirtualMachineNetworkInterfaceAllocateNewIpJSONBody struct { - AddressVersion IPAddressVersionEnum `json:"address_version"` - - // VirtualMachineNetworkInterface All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. - VirtualMachineNetworkInterface VirtualMachineNetworkInterfaceLookup `json:"virtual_machine_network_interface"` -} - -// GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams defines parameters for GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion. -type GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams struct { - // VirtualMachineNetworkInterfaceId The network interface to get IP addresses for. All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. - VirtualMachineNetworkInterfaceId *string `form:"virtual_machine_network_interface[id],omitempty" json:"virtual_machine_network_interface[id],omitempty"` - - // AddressVersion The IP address version to return results for - AddressVersion IPAddressVersionEnum `form:"address_version" json:"address_version"` -} - -// PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONBody defines parameters for PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile. -type PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONBody struct { - // SpeedProfile All 'speed_profile[]' params are mutually exclusive, only one can be provided. - SpeedProfile NetworkSpeedProfileLookup `json:"speed_profile"` - - // VirtualMachineNetworkInterface All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. - VirtualMachineNetworkInterface VirtualMachineNetworkInterfaceLookup `json:"virtual_machine_network_interface"` -} - -// GetVirtualMachinePackagesParams defines parameters for GetVirtualMachinePackages. -type GetVirtualMachinePackagesParams struct { - // OrganizationId Provide an organization to only show packages available to the given organization (otherwise only public packages will be displayed). All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` - - // OrganizationSubDomain Provide an organization to only show packages available to the given organization (otherwise only public packages will be displayed). All 'organization[]' params are mutually exclusive, only one can be provided. - OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetVirtualMachinePackageParams defines parameters for GetVirtualMachinePackage. -type GetVirtualMachinePackageParams struct { - // VirtualMachinePackageId All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. - VirtualMachinePackageId *string `form:"virtual_machine_package[id],omitempty" json:"virtual_machine_package[id],omitempty"` - - // VirtualMachinePackagePermalink All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. - VirtualMachinePackagePermalink *string `form:"virtual_machine_package[permalink],omitempty" json:"virtual_machine_package[permalink],omitempty"` -} - -// DeleteVirtualMachineJSONBody defines parameters for DeleteVirtualMachine. -type DeleteVirtualMachineJSONBody struct { - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine *VirtualMachineLookup `json:"virtual_machine,omitempty"` -} - -// GetVirtualMachineParams defines parameters for GetVirtualMachine. -type GetVirtualMachineParams struct { - // VirtualMachineId All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` - - // VirtualMachineFqdn All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` -} - -// PatchVirtualMachineJSONBody defines parameters for PatchVirtualMachine. -type PatchVirtualMachineJSONBody struct { - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties VirtualMachineArguments `json:"properties"` - - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// PostVirtualMachineAllocateIpJSONBody defines parameters for PostVirtualMachineAllocateIp. -type PostVirtualMachineAllocateIpJSONBody struct { - // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. - IpAddress IPAddressLookup `json:"ip_address"` - - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// PostVirtualMachineConsoleSessionsJSONBody defines parameters for PostVirtualMachineConsoleSessions. -type PostVirtualMachineConsoleSessionsJSONBody struct { - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// GetVirtualMachineDiskBackupPoliciesParams defines parameters for GetVirtualMachineDiskBackupPolicies. -type GetVirtualMachineDiskBackupPoliciesParams struct { - // VirtualMachineId The virtual machine to return disk backup policies for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` - - // VirtualMachineFqdn The virtual machine to return disk backup policies for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` - - // IncludeDisks If true, the returned list will include backup policies owned by disks assigned to this virtual machine in addition to those that belong to the whole virtual machine - IncludeDisks *bool `form:"include_disks,omitempty" json:"include_disks,omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PostVirtualMachineDiskBackupPoliciesJSONBody defines parameters for PostVirtualMachineDiskBackupPolicies. -type PostVirtualMachineDiskBackupPoliciesJSONBody struct { - // Properties All 'properties[]' params are mutually exclusive, only one can be provided. - Properties DiskBackupPolicyArguments `json:"properties"` - - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// GetVirtualMachineDisksParams defines parameters for GetVirtualMachineDisks. -type GetVirtualMachineDisksParams struct { - // VirtualMachineId The virtual machine to find disks for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` - - // VirtualMachineFqdn The virtual machine to find disks for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// PutVirtualMachineFlexibleResourcesJSONBody defines parameters for PutVirtualMachineFlexibleResources. -type PutVirtualMachineFlexibleResourcesJSONBody struct { - // Resources All 'resources[]' params are mutually exclusive, only one can be provided. - Resources VirtualMachineFlexibleResources `json:"resources"` - - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// GetVirtualMachineNetworkInterfacesParams defines parameters for GetVirtualMachineNetworkInterfaces. -type GetVirtualMachineNetworkInterfacesParams struct { - // VirtualMachineId The virtual machine to show network interfaces for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` - - // VirtualMachineFqdn The virtual machine to show network interfaces for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` - Page *int `form:"page,omitempty" json:"page,omitempty"` - PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` -} - -// GetVirtualMachineNetworkInterfaceParams defines parameters for GetVirtualMachineNetworkInterface. -type GetVirtualMachineNetworkInterfaceParams struct { - // VirtualMachineId The virtual machine to find the network interface for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` - - // VirtualMachineFqdn The virtual machine to find the network interface for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` - - // NetworkId The network to find the network interface for. All 'network[]' params are mutually exclusive, only one can be provided. - NetworkId *string `form:"network[id],omitempty" json:"network[id],omitempty"` - - // NetworkPermalink The network to find the network interface for. All 'network[]' params are mutually exclusive, only one can be provided. - NetworkPermalink *string `form:"network[permalink],omitempty" json:"network[permalink],omitempty"` -} - -// PutVirtualMachinePackageJSONBody defines parameters for PutVirtualMachinePackage. -type PutVirtualMachinePackageJSONBody struct { - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` - - // VirtualMachinePackage All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. - VirtualMachinePackage VirtualMachinePackageLookup `json:"virtual_machine_package"` -} - -// PostVirtualMachineResetJSONBody defines parameters for PostVirtualMachineReset. -type PostVirtualMachineResetJSONBody struct { - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// PostVirtualMachineShutdownJSONBody defines parameters for PostVirtualMachineShutdown. -type PostVirtualMachineShutdownJSONBody struct { - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// PostVirtualMachineStartJSONBody defines parameters for PostVirtualMachineStart. -type PostVirtualMachineStartJSONBody struct { - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// PostVirtualMachineStopJSONBody defines parameters for PostVirtualMachineStop. -type PostVirtualMachineStopJSONBody struct { - // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. - VirtualMachine VirtualMachineLookup `json:"virtual_machine"` -} - -// GetVirtualMachinesBuildsVirtualMachineBuildParams defines parameters for GetVirtualMachinesBuildsVirtualMachineBuild. -type GetVirtualMachinesBuildsVirtualMachineBuildParams struct { - // VirtualMachineBuildId All 'virtual_machine_build[]' params are mutually exclusive, only one can be provided. - VirtualMachineBuildId *string `form:"virtual_machine_build[id],omitempty" json:"virtual_machine_build[id],omitempty"` -} - -// GetZoneParams defines parameters for GetZone. -type GetZoneParams struct { - // ZoneId The zone to find. All 'zone[]' params are mutually exclusive, only one can be provided. - ZoneId *string `form:"zone[id],omitempty" json:"zone[id],omitempty"` - - // ZonePermalink The zone to find. All 'zone[]' params are mutually exclusive, only one can be provided. - ZonePermalink *string `form:"zone[permalink],omitempty" json:"zone[permalink],omitempty"` -} - -// DeleteDiskBackupPolicyJSONRequestBody defines body for DeleteDiskBackupPolicy for application/json ContentType. -type DeleteDiskBackupPolicyJSONRequestBody DeleteDiskBackupPolicyJSONBody - -// PatchDiskBackupPolicyJSONRequestBody defines body for PatchDiskBackupPolicy for application/json ContentType. -type PatchDiskBackupPolicyJSONRequestBody PatchDiskBackupPolicyJSONBody - -// DeleteDiskBackupPolicyScheduleJSONRequestBody defines body for DeleteDiskBackupPolicySchedule for application/json ContentType. -type DeleteDiskBackupPolicyScheduleJSONRequestBody DeleteDiskBackupPolicyScheduleJSONBody - -// PostDiskDiskBackupPoliciesJSONRequestBody defines body for PostDiskDiskBackupPolicies for application/json ContentType. -type PostDiskDiskBackupPoliciesJSONRequestBody PostDiskDiskBackupPoliciesJSONBody - -// DeleteDnsRecordJSONRequestBody defines body for DeleteDnsRecord for application/json ContentType. -type DeleteDnsRecordJSONRequestBody DeleteDnsRecordJSONBody - -// PatchDnsRecordJSONRequestBody defines body for PatchDnsRecord for application/json ContentType. -type PatchDnsRecordJSONRequestBody PatchDnsRecordJSONBody - -// DeleteDnsZoneJSONRequestBody defines body for DeleteDnsZone for application/json ContentType. -type DeleteDnsZoneJSONRequestBody DeleteDnsZoneJSONBody - -// PatchDnsZoneJSONRequestBody defines body for PatchDnsZone for application/json ContentType. -type PatchDnsZoneJSONRequestBody PatchDnsZoneJSONBody - -// PostDnsZoneRecordsJSONRequestBody defines body for PostDnsZoneRecords for application/json ContentType. -type PostDnsZoneRecordsJSONRequestBody PostDnsZoneRecordsJSONBody - -// PostDnsZoneVerifyJSONRequestBody defines body for PostDnsZoneVerify for application/json ContentType. -type PostDnsZoneVerifyJSONRequestBody PostDnsZoneVerifyJSONBody - -// DeleteFileStorageVolumeJSONRequestBody defines body for DeleteFileStorageVolume for application/json ContentType. -type DeleteFileStorageVolumeJSONRequestBody DeleteFileStorageVolumeJSONBody - -// PatchFileStorageVolumeJSONRequestBody defines body for PatchFileStorageVolume for application/json ContentType. -type PatchFileStorageVolumeJSONRequestBody PatchFileStorageVolumeJSONBody - -// PostInvalidateLinkedWebSessionJSONRequestBody defines body for PostInvalidateLinkedWebSession for application/json ContentType. -type PostInvalidateLinkedWebSessionJSONRequestBody = PostInvalidateLinkedWebSessionJSONBody - -// DeleteIpAddressJSONRequestBody defines body for DeleteIpAddress for application/json ContentType. -type DeleteIpAddressJSONRequestBody DeleteIpAddressJSONBody - -// PatchIpAddressJSONRequestBody defines body for PatchIpAddress for application/json ContentType. -type PatchIpAddressJSONRequestBody PatchIpAddressJSONBody - -// PostIpAddressUnallocateJSONRequestBody defines body for PostIpAddressUnallocate for application/json ContentType. -type PostIpAddressUnallocateJSONRequestBody PostIpAddressUnallocateJSONBody - -// DeleteLoadBalancerJSONRequestBody defines body for DeleteLoadBalancer for application/json ContentType. -type DeleteLoadBalancerJSONRequestBody DeleteLoadBalancerJSONBody - -// PatchLoadBalancerJSONRequestBody defines body for PatchLoadBalancer for application/json ContentType. -type PatchLoadBalancerJSONRequestBody PatchLoadBalancerJSONBody - -// PostLoadBalancerRulesJSONRequestBody defines body for PostLoadBalancerRules for application/json ContentType. -type PostLoadBalancerRulesJSONRequestBody PostLoadBalancerRulesJSONBody - -// DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody defines body for DeleteLoadBalancersRulesLoadBalancerRule for application/json ContentType. -type DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody DeleteLoadBalancersRulesLoadBalancerRuleJSONBody - -// PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody defines body for PatchLoadBalancersRulesLoadBalancerRule for application/json ContentType. -type PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody PatchLoadBalancersRulesLoadBalancerRuleJSONBody - -// PostOrganizationDnsZonesJSONRequestBody defines body for PostOrganizationDnsZones for application/json ContentType. -type PostOrganizationDnsZonesJSONRequestBody PostOrganizationDnsZonesJSONBody - -// PostOrganizationFileStorageVolumesJSONRequestBody defines body for PostOrganizationFileStorageVolumes for application/json ContentType. -type PostOrganizationFileStorageVolumesJSONRequestBody PostOrganizationFileStorageVolumesJSONBody - -// PostOrganizationIpAddressesJSONRequestBody defines body for PostOrganizationIpAddresses for application/json ContentType. -type PostOrganizationIpAddressesJSONRequestBody PostOrganizationIpAddressesJSONBody - -// PostOrganizationLoadBalancersJSONRequestBody defines body for PostOrganizationLoadBalancers for application/json ContentType. -type PostOrganizationLoadBalancersJSONRequestBody PostOrganizationLoadBalancersJSONBody - -// PostOrganizationManagedJSONRequestBody defines body for PostOrganizationManaged for application/json ContentType. -type PostOrganizationManagedJSONRequestBody PostOrganizationManagedJSONBody - -// PostOrganizationSecurityGroupsJSONRequestBody defines body for PostOrganizationSecurityGroups for application/json ContentType. -type PostOrganizationSecurityGroupsJSONRequestBody PostOrganizationSecurityGroupsJSONBody - -// PostOrganizationSshKeysJSONRequestBody defines body for PostOrganizationSshKeys for application/json ContentType. -type PostOrganizationSshKeysJSONRequestBody PostOrganizationSshKeysJSONBody - -// PostOrganizationTagsJSONRequestBody defines body for PostOrganizationTags for application/json ContentType. -type PostOrganizationTagsJSONRequestBody PostOrganizationTagsJSONBody - -// PostOrganizationTrashObjectsPurgeAllJSONRequestBody defines body for PostOrganizationTrashObjectsPurgeAll for application/json ContentType. -type PostOrganizationTrashObjectsPurgeAllJSONRequestBody PostOrganizationTrashObjectsPurgeAllJSONBody - -// PostOrganizationVirtualMachineGroupsJSONRequestBody defines body for PostOrganizationVirtualMachineGroups for application/json ContentType. -type PostOrganizationVirtualMachineGroupsJSONRequestBody PostOrganizationVirtualMachineGroupsJSONBody - -// PostOrganizationVirtualMachinesBuildJSONRequestBody defines body for PostOrganizationVirtualMachinesBuild for application/json ContentType. -type PostOrganizationVirtualMachinesBuildJSONRequestBody PostOrganizationVirtualMachinesBuildJSONBody - -// PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody defines body for PostOrganizationVirtualMachinesBuildFromSpec for application/json ContentType. -type PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody PostOrganizationVirtualMachinesBuildFromSpecJSONBody - -// DeleteSecurityGroupJSONRequestBody defines body for DeleteSecurityGroup for application/json ContentType. -type DeleteSecurityGroupJSONRequestBody DeleteSecurityGroupJSONBody - -// PatchSecurityGroupJSONRequestBody defines body for PatchSecurityGroup for application/json ContentType. -type PatchSecurityGroupJSONRequestBody PatchSecurityGroupJSONBody - -// PostSecurityGroupRulesJSONRequestBody defines body for PostSecurityGroupRules for application/json ContentType. -type PostSecurityGroupRulesJSONRequestBody PostSecurityGroupRulesJSONBody - -// DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody defines body for DeleteSecurityGroupsRulesSecurityGroupRule for application/json ContentType. -type DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody DeleteSecurityGroupsRulesSecurityGroupRuleJSONBody - -// PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody defines body for PatchSecurityGroupsRulesSecurityGroupRule for application/json ContentType. -type PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody PatchSecurityGroupsRulesSecurityGroupRuleJSONBody - -// DeleteSshKeyJSONRequestBody defines body for DeleteSshKey for application/json ContentType. -type DeleteSshKeyJSONRequestBody DeleteSshKeyJSONBody - -// DeleteTagJSONRequestBody defines body for DeleteTag for application/json ContentType. -type DeleteTagJSONRequestBody DeleteTagJSONBody - -// PatchTagJSONRequestBody defines body for PatchTag for application/json ContentType. -type PatchTagJSONRequestBody PatchTagJSONBody - -// DeleteTrashObjectJSONRequestBody defines body for DeleteTrashObject for application/json ContentType. -type DeleteTrashObjectJSONRequestBody DeleteTrashObjectJSONBody - -// PostTrashObjectRestoreJSONRequestBody defines body for PostTrashObjectRestore for application/json ContentType. -type PostTrashObjectRestoreJSONRequestBody PostTrashObjectRestoreJSONBody - -// DeleteVirtualMachineGroupJSONRequestBody defines body for DeleteVirtualMachineGroup for application/json ContentType. -type DeleteVirtualMachineGroupJSONRequestBody DeleteVirtualMachineGroupJSONBody - -// PatchVirtualMachineGroupJSONRequestBody defines body for PatchVirtualMachineGroup for application/json ContentType. -type PatchVirtualMachineGroupJSONRequestBody PatchVirtualMachineGroupJSONBody - -// PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody defines body for PostVirtualMachineNetworkInterfaceAllocateIp for application/json ContentType. -type PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody PostVirtualMachineNetworkInterfaceAllocateIpJSONBody - -// PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody defines body for PostVirtualMachineNetworkInterfaceAllocateNewIp for application/json ContentType. -type PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody PostVirtualMachineNetworkInterfaceAllocateNewIpJSONBody - -// PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody defines body for PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile for application/json ContentType. -type PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONBody - -// DeleteVirtualMachineJSONRequestBody defines body for DeleteVirtualMachine for application/json ContentType. -type DeleteVirtualMachineJSONRequestBody DeleteVirtualMachineJSONBody - -// PatchVirtualMachineJSONRequestBody defines body for PatchVirtualMachine for application/json ContentType. -type PatchVirtualMachineJSONRequestBody PatchVirtualMachineJSONBody - -// PostVirtualMachineAllocateIpJSONRequestBody defines body for PostVirtualMachineAllocateIp for application/json ContentType. -type PostVirtualMachineAllocateIpJSONRequestBody PostVirtualMachineAllocateIpJSONBody - -// PostVirtualMachineConsoleSessionsJSONRequestBody defines body for PostVirtualMachineConsoleSessions for application/json ContentType. -type PostVirtualMachineConsoleSessionsJSONRequestBody PostVirtualMachineConsoleSessionsJSONBody - -// PostVirtualMachineDiskBackupPoliciesJSONRequestBody defines body for PostVirtualMachineDiskBackupPolicies for application/json ContentType. -type PostVirtualMachineDiskBackupPoliciesJSONRequestBody PostVirtualMachineDiskBackupPoliciesJSONBody - -// PutVirtualMachineFlexibleResourcesJSONRequestBody defines body for PutVirtualMachineFlexibleResources for application/json ContentType. -type PutVirtualMachineFlexibleResourcesJSONRequestBody PutVirtualMachineFlexibleResourcesJSONBody - -// PutVirtualMachinePackageJSONRequestBody defines body for PutVirtualMachinePackage for application/json ContentType. -type PutVirtualMachinePackageJSONRequestBody PutVirtualMachinePackageJSONBody - -// PostVirtualMachineResetJSONRequestBody defines body for PostVirtualMachineReset for application/json ContentType. -type PostVirtualMachineResetJSONRequestBody PostVirtualMachineResetJSONBody - -// PostVirtualMachineShutdownJSONRequestBody defines body for PostVirtualMachineShutdown for application/json ContentType. -type PostVirtualMachineShutdownJSONRequestBody PostVirtualMachineShutdownJSONBody - -// PostVirtualMachineStartJSONRequestBody defines body for PostVirtualMachineStart for application/json ContentType. -type PostVirtualMachineStartJSONRequestBody PostVirtualMachineStartJSONBody - -// PostVirtualMachineStopJSONRequestBody defines body for PostVirtualMachineStop for application/json ContentType. -type PostVirtualMachineStopJSONRequestBody PostVirtualMachineStopJSONBody - -// AsVirtualMachine returns the union data inside the DiskBackupPolicyTarget_Target as a VirtualMachine -func (t DiskBackupPolicyTarget_Target) AsVirtualMachine() (VirtualMachine, error) { - var body VirtualMachine - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachine overwrites any union data inside the DiskBackupPolicyTarget_Target as the provided VirtualMachine -func (t *DiskBackupPolicyTarget_Target) FromVirtualMachine(v VirtualMachine) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachine performs a merge with any union data inside the DiskBackupPolicyTarget_Target, using the provided VirtualMachine -func (t *DiskBackupPolicyTarget_Target) MergeVirtualMachine(v VirtualMachine) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsDisk returns the union data inside the DiskBackupPolicyTarget_Target as a Disk -func (t DiskBackupPolicyTarget_Target) AsDisk() (Disk, error) { - var body Disk - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromDisk overwrites any union data inside the DiskBackupPolicyTarget_Target as the provided Disk -func (t *DiskBackupPolicyTarget_Target) FromDisk(v Disk) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeDisk performs a merge with any union data inside the DiskBackupPolicyTarget_Target, using the provided Disk -func (t *DiskBackupPolicyTarget_Target) MergeDisk(v Disk) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t DiskBackupPolicyTarget_Target) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *DiskBackupPolicyTarget_Target) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsVirtualMachine returns the union data inside the LoadBalancerResource_Resources as a VirtualMachine -func (t LoadBalancerResource_Resources) AsVirtualMachine() (VirtualMachine, error) { - var body VirtualMachine - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachine overwrites any union data inside the LoadBalancerResource_Resources as the provided VirtualMachine -func (t *LoadBalancerResource_Resources) FromVirtualMachine(v VirtualMachine) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachine performs a merge with any union data inside the LoadBalancerResource_Resources, using the provided VirtualMachine -func (t *LoadBalancerResource_Resources) MergeVirtualMachine(v VirtualMachine) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsVirtualMachineGroup returns the union data inside the LoadBalancerResource_Resources as a VirtualMachineGroup -func (t LoadBalancerResource_Resources) AsVirtualMachineGroup() (VirtualMachineGroup, error) { - var body VirtualMachineGroup - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachineGroup overwrites any union data inside the LoadBalancerResource_Resources as the provided VirtualMachineGroup -func (t *LoadBalancerResource_Resources) FromVirtualMachineGroup(v VirtualMachineGroup) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachineGroup performs a merge with any union data inside the LoadBalancerResource_Resources, using the provided VirtualMachineGroup -func (t *LoadBalancerResource_Resources) MergeVirtualMachineGroup(v VirtualMachineGroup) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsTag returns the union data inside the LoadBalancerResource_Resources as a Tag -func (t LoadBalancerResource_Resources) AsTag() (Tag, error) { - var body Tag - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromTag overwrites any union data inside the LoadBalancerResource_Resources as the provided Tag -func (t *LoadBalancerResource_Resources) FromTag(v Tag) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeTag performs a merge with any union data inside the LoadBalancerResource_Resources, using the provided Tag -func (t *LoadBalancerResource_Resources) MergeTag(v Tag) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t LoadBalancerResource_Resources) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *LoadBalancerResource_Resources) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfAPIAuthenticator403Response as a UnauthorizedNetworkForAPITokenSchema -func (t OneOfAPIAuthenticator403Response) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { - var body UnauthorizedNetworkForAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfAPIAuthenticator403Response as the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfAPIAuthenticator403Response) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfAPIAuthenticator403Response, using the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfAPIAuthenticator403Response) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidAPITokenSchema returns the union data inside the OneOfAPIAuthenticator403Response as a InvalidAPITokenSchema -func (t OneOfAPIAuthenticator403Response) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { - var body InvalidAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidAPITokenSchema overwrites any union data inside the OneOfAPIAuthenticator403Response as the provided InvalidAPITokenSchema -func (t *OneOfAPIAuthenticator403Response) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfAPIAuthenticator403Response, using the provided InvalidAPITokenSchema -func (t *OneOfAPIAuthenticator403Response) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfAPIAuthenticator403Response as a ScopeNotGrantedErrorSchema -func (t OneOfAPIAuthenticator403Response) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { - var body ScopeNotGrantedErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfAPIAuthenticator403Response as the provided ScopeNotGrantedErrorSchema -func (t *OneOfAPIAuthenticator403Response) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfAPIAuthenticator403Response, using the provided ScopeNotGrantedErrorSchema -func (t *OneOfAPIAuthenticator403Response) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfAPIAuthenticator403Response) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfAPIAuthenticator403Response) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsOrganizationNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a OrganizationNotFoundSchema -func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsOrganizationNotFoundSchema() (OrganizationNotFoundSchema, error) { - var body OrganizationNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided OrganizationNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided OrganizationNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsZoneNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a ZoneNotFoundSchema -func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsZoneNotFoundSchema() (ZoneNotFoundSchema, error) { - var body ZoneNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromZoneNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided ZoneNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromZoneNotFoundSchema(v ZoneNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeZoneNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided ZoneNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeZoneNotFoundSchema(v ZoneNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsDataCenterNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a DataCenterNotFoundSchema -func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsDataCenterNotFoundSchema() (DataCenterNotFoundSchema, error) { - var body DataCenterNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromDataCenterNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided DataCenterNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromDataCenterNotFoundSchema(v DataCenterNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeDataCenterNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided DataCenterNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeDataCenterNotFoundSchema(v DataCenterNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsVirtualMachinePackageNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a VirtualMachinePackageNotFoundSchema -func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsVirtualMachinePackageNotFoundSchema() (VirtualMachinePackageNotFoundSchema, error) { - var body VirtualMachinePackageNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachinePackageNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided VirtualMachinePackageNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachinePackageNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided VirtualMachinePackageNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsDiskTemplateNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a DiskTemplateNotFoundSchema -func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsDiskTemplateNotFoundSchema() (DiskTemplateNotFoundSchema, error) { - var body DiskTemplateNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromDiskTemplateNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided DiskTemplateNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromDiskTemplateNotFoundSchema(v DiskTemplateNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeDiskTemplateNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided DiskTemplateNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeDiskTemplateNotFoundSchema(v DiskTemplateNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsNetworkNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a NetworkNotFoundSchema -func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsNetworkNotFoundSchema() (NetworkNotFoundSchema, error) { - var body NetworkNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromNetworkNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided NetworkNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromNetworkNotFoundSchema(v NetworkNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeNetworkNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided NetworkNotFoundSchema -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeNetworkNotFoundSchema(v NetworkNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a UnauthorizedNetworkForAPITokenSchema -func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { - var body UnauthorizedNetworkForAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidAPITokenSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a InvalidAPITokenSchema -func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { - var body InvalidAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidAPITokenSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided InvalidAPITokenSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided InvalidAPITokenSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a ScopeNotGrantedErrorSchema -func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { - var body ScopeNotGrantedErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided ScopeNotGrantedErrorSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided ScopeNotGrantedErrorSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPermissionDeniedSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a PermissionDeniedSchema -func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { - var body PermissionDeniedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPermissionDeniedSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided PermissionDeniedSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided PermissionDeniedSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsFlexibleResourcesUnavailableToOrganizationSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a FlexibleResourcesUnavailableToOrganizationSchema -func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsFlexibleResourcesUnavailableToOrganizationSchema() (FlexibleResourcesUnavailableToOrganizationSchema, error) { - var body FlexibleResourcesUnavailableToOrganizationSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromFlexibleResourcesUnavailableToOrganizationSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided FlexibleResourcesUnavailableToOrganizationSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromFlexibleResourcesUnavailableToOrganizationSchema(v FlexibleResourcesUnavailableToOrganizationSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeFlexibleResourcesUnavailableToOrganizationSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided FlexibleResourcesUnavailableToOrganizationSchema -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeFlexibleResourcesUnavailableToOrganizationSchema(v FlexibleResourcesUnavailableToOrganizationSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsVirtualMachineNetworkInterfaceNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a VirtualMachineNetworkInterfaceNotFoundSchema -func (t OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsVirtualMachineNetworkInterfaceNotFoundSchema() (VirtualMachineNetworkInterfaceNotFoundSchema, error) { - var body VirtualMachineNetworkInterfaceNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachineNetworkInterfaceNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided VirtualMachineNetworkInterfaceNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachineNetworkInterfaceNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided VirtualMachineNetworkInterfaceNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsIPAddressNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a IPAddressNotFoundSchema -func (t OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsIPAddressNotFoundSchema() (IPAddressNotFoundSchema, error) { - var body IPAddressNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromIPAddressNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided IPAddressNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeIPAddressNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided IPAddressNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsVirtualMachineNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as a VirtualMachineNotFoundSchema -func (t OneOfIPAddressNotFoundVirtualMachineNotFound404Res) AsVirtualMachineNotFoundSchema() (VirtualMachineNotFoundSchema, error) { - var body VirtualMachineNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachineNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as the provided VirtualMachineNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) FromVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachineNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res, using the provided VirtualMachineNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) MergeVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsIPAddressNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as a IPAddressNotFoundSchema -func (t OneOfIPAddressNotFoundVirtualMachineNotFound404Res) AsIPAddressNotFoundSchema() (IPAddressNotFoundSchema, error) { - var body IPAddressNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromIPAddressNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as the provided IPAddressNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) FromIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeIPAddressNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res, using the provided IPAddressNotFoundSchema -func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) MergeIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfIPAddressNotFoundVirtualMachineNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsIPAlreadyAllocatedSchema returns the union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as a IPAlreadyAllocatedSchema -func (t OneOfIPAlreadyAllocatedInvalidIP422Res) AsIPAlreadyAllocatedSchema() (IPAlreadyAllocatedSchema, error) { - var body IPAlreadyAllocatedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromIPAlreadyAllocatedSchema overwrites any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as the provided IPAlreadyAllocatedSchema -func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) FromIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeIPAlreadyAllocatedSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res, using the provided IPAlreadyAllocatedSchema -func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) MergeIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidIPSchema returns the union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as a InvalidIPSchema -func (t OneOfIPAlreadyAllocatedInvalidIP422Res) AsInvalidIPSchema() (InvalidIPSchema, error) { - var body InvalidIPSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidIPSchema overwrites any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as the provided InvalidIPSchema -func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) FromInvalidIPSchema(v InvalidIPSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidIPSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res, using the provided InvalidIPSchema -func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) MergeInvalidIPSchema(v InvalidIPSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfIPAlreadyAllocatedInvalidIP422Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsNoInterfaceAvailableSchema returns the union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as a NoInterfaceAvailableSchema -func (t OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) AsNoInterfaceAvailableSchema() (NoInterfaceAvailableSchema, error) { - var body NoInterfaceAvailableSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromNoInterfaceAvailableSchema overwrites any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as the provided NoInterfaceAvailableSchema -func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) FromNoInterfaceAvailableSchema(v NoInterfaceAvailableSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeNoInterfaceAvailableSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res, using the provided NoInterfaceAvailableSchema -func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) MergeNoInterfaceAvailableSchema(v NoInterfaceAvailableSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsIPAlreadyAllocatedSchema returns the union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as a IPAlreadyAllocatedSchema -func (t OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) AsIPAlreadyAllocatedSchema() (IPAlreadyAllocatedSchema, error) { - var body IPAlreadyAllocatedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromIPAlreadyAllocatedSchema overwrites any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as the provided IPAlreadyAllocatedSchema -func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) FromIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeIPAlreadyAllocatedSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res, using the provided IPAlreadyAllocatedSchema -func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) MergeIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsAPIAuthenticator400Schema returns the union data inside the OneOfIdentityNotLinkedToWebSession400Res as a APIAuthenticator400Schema -func (t OneOfIdentityNotLinkedToWebSession400Res) AsAPIAuthenticator400Schema() (APIAuthenticator400Schema, error) { - var body APIAuthenticator400Schema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromAPIAuthenticator400Schema overwrites any union data inside the OneOfIdentityNotLinkedToWebSession400Res as the provided APIAuthenticator400Schema -func (t *OneOfIdentityNotLinkedToWebSession400Res) FromAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeAPIAuthenticator400Schema performs a merge with any union data inside the OneOfIdentityNotLinkedToWebSession400Res, using the provided APIAuthenticator400Schema -func (t *OneOfIdentityNotLinkedToWebSession400Res) MergeAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsIdentityNotLinkedToWebSessionSchema returns the union data inside the OneOfIdentityNotLinkedToWebSession400Res as a IdentityNotLinkedToWebSessionSchema -func (t OneOfIdentityNotLinkedToWebSession400Res) AsIdentityNotLinkedToWebSessionSchema() (IdentityNotLinkedToWebSessionSchema, error) { - var body IdentityNotLinkedToWebSessionSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromIdentityNotLinkedToWebSessionSchema overwrites any union data inside the OneOfIdentityNotLinkedToWebSession400Res as the provided IdentityNotLinkedToWebSessionSchema -func (t *OneOfIdentityNotLinkedToWebSession400Res) FromIdentityNotLinkedToWebSessionSchema(v IdentityNotLinkedToWebSessionSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeIdentityNotLinkedToWebSessionSchema performs a merge with any union data inside the OneOfIdentityNotLinkedToWebSession400Res, using the provided IdentityNotLinkedToWebSessionSchema -func (t *OneOfIdentityNotLinkedToWebSession400Res) MergeIdentityNotLinkedToWebSessionSchema(v IdentityNotLinkedToWebSessionSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfIdentityNotLinkedToWebSession400Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfIdentityNotLinkedToWebSession400Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsVirtualMachineNotFoundSchema returns the union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as a VirtualMachineNotFoundSchema -func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) AsVirtualMachineNotFoundSchema() (VirtualMachineNotFoundSchema, error) { - var body VirtualMachineNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachineNotFoundSchema overwrites any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as the provided VirtualMachineNotFoundSchema -func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) FromVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachineNotFoundSchema performs a merge with any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res, using the provided VirtualMachineNotFoundSchema -func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MergeVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsNetworkNotFoundSchema returns the union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as a NetworkNotFoundSchema -func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) AsNetworkNotFoundSchema() (NetworkNotFoundSchema, error) { - var body NetworkNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromNetworkNotFoundSchema overwrites any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as the provided NetworkNotFoundSchema -func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) FromNetworkNotFoundSchema(v NetworkNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeNetworkNotFoundSchema performs a merge with any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res, using the provided NetworkNotFoundSchema -func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MergeNetworkNotFoundSchema(v NetworkNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInterfaceNotFoundSchema returns the union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as a InterfaceNotFoundSchema -func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) AsInterfaceNotFoundSchema() (InterfaceNotFoundSchema, error) { - var body InterfaceNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInterfaceNotFoundSchema overwrites any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as the provided InterfaceNotFoundSchema -func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) FromInterfaceNotFoundSchema(v InterfaceNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInterfaceNotFoundSchema performs a merge with any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res, using the provided InterfaceNotFoundSchema -func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MergeInterfaceNotFoundSchema(v InterfaceNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsAPIAuthenticator400Schema returns the union data inside the OneOfInvalidSpecXML400Res as a APIAuthenticator400Schema -func (t OneOfInvalidSpecXML400Res) AsAPIAuthenticator400Schema() (APIAuthenticator400Schema, error) { - var body APIAuthenticator400Schema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromAPIAuthenticator400Schema overwrites any union data inside the OneOfInvalidSpecXML400Res as the provided APIAuthenticator400Schema -func (t *OneOfInvalidSpecXML400Res) FromAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeAPIAuthenticator400Schema performs a merge with any union data inside the OneOfInvalidSpecXML400Res, using the provided APIAuthenticator400Schema -func (t *OneOfInvalidSpecXML400Res) MergeAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidSpecXMLSchema returns the union data inside the OneOfInvalidSpecXML400Res as a InvalidSpecXMLSchema -func (t OneOfInvalidSpecXML400Res) AsInvalidSpecXMLSchema() (InvalidSpecXMLSchema, error) { - var body InvalidSpecXMLSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidSpecXMLSchema overwrites any union data inside the OneOfInvalidSpecXML400Res as the provided InvalidSpecXMLSchema -func (t *OneOfInvalidSpecXML400Res) FromInvalidSpecXMLSchema(v InvalidSpecXMLSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidSpecXMLSchema performs a merge with any union data inside the OneOfInvalidSpecXML400Res, using the provided InvalidSpecXMLSchema -func (t *OneOfInvalidSpecXML400Res) MergeInvalidSpecXMLSchema(v InvalidSpecXMLSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfInvalidSpecXML400Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfInvalidSpecXML400Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsAPIAuthenticator400Schema returns the union data inside the OneOfInvalidTimestamp400Res as a APIAuthenticator400Schema -func (t OneOfInvalidTimestamp400Res) AsAPIAuthenticator400Schema() (APIAuthenticator400Schema, error) { - var body APIAuthenticator400Schema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromAPIAuthenticator400Schema overwrites any union data inside the OneOfInvalidTimestamp400Res as the provided APIAuthenticator400Schema -func (t *OneOfInvalidTimestamp400Res) FromAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeAPIAuthenticator400Schema performs a merge with any union data inside the OneOfInvalidTimestamp400Res, using the provided APIAuthenticator400Schema -func (t *OneOfInvalidTimestamp400Res) MergeAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidTimestampSchema returns the union data inside the OneOfInvalidTimestamp400Res as a InvalidTimestampSchema -func (t OneOfInvalidTimestamp400Res) AsInvalidTimestampSchema() (InvalidTimestampSchema, error) { - var body InvalidTimestampSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidTimestampSchema overwrites any union data inside the OneOfInvalidTimestamp400Res as the provided InvalidTimestampSchema -func (t *OneOfInvalidTimestamp400Res) FromInvalidTimestampSchema(v InvalidTimestampSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidTimestampSchema performs a merge with any union data inside the OneOfInvalidTimestamp400Res, using the provided InvalidTimestampSchema -func (t *OneOfInvalidTimestamp400Res) MergeInvalidTimestampSchema(v InvalidTimestampSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfInvalidTimestamp400Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfInvalidTimestamp400Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsValidationErrorSchema returns the union data inside the OneOfLocationRequiredValidationError422Res as a ValidationErrorSchema -func (t OneOfLocationRequiredValidationError422Res) AsValidationErrorSchema() (ValidationErrorSchema, error) { - var body ValidationErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromValidationErrorSchema overwrites any union data inside the OneOfLocationRequiredValidationError422Res as the provided ValidationErrorSchema -func (t *OneOfLocationRequiredValidationError422Res) FromValidationErrorSchema(v ValidationErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeValidationErrorSchema performs a merge with any union data inside the OneOfLocationRequiredValidationError422Res, using the provided ValidationErrorSchema -func (t *OneOfLocationRequiredValidationError422Res) MergeValidationErrorSchema(v ValidationErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsLocationRequiredSchema returns the union data inside the OneOfLocationRequiredValidationError422Res as a LocationRequiredSchema -func (t OneOfLocationRequiredValidationError422Res) AsLocationRequiredSchema() (LocationRequiredSchema, error) { - var body LocationRequiredSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromLocationRequiredSchema overwrites any union data inside the OneOfLocationRequiredValidationError422Res as the provided LocationRequiredSchema -func (t *OneOfLocationRequiredValidationError422Res) FromLocationRequiredSchema(v LocationRequiredSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeLocationRequiredSchema performs a merge with any union data inside the OneOfLocationRequiredValidationError422Res, using the provided LocationRequiredSchema -func (t *OneOfLocationRequiredValidationError422Res) MergeLocationRequiredSchema(v LocationRequiredSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfLocationRequiredValidationError422Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfLocationRequiredValidationError422Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsOrganizationNotFoundSchema returns the union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as a OrganizationNotFoundSchema -func (t OneOfNetworkNotFoundOrganizationNotFound404Res) AsOrganizationNotFoundSchema() (OrganizationNotFoundSchema, error) { - var body OrganizationNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationNotFoundSchema overwrites any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as the provided OrganizationNotFoundSchema -func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) FromOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationNotFoundSchema performs a merge with any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res, using the provided OrganizationNotFoundSchema -func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) MergeOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsNetworkNotFoundSchema returns the union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as a NetworkNotFoundSchema -func (t OneOfNetworkNotFoundOrganizationNotFound404Res) AsNetworkNotFoundSchema() (NetworkNotFoundSchema, error) { - var body NetworkNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromNetworkNotFoundSchema overwrites any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as the provided NetworkNotFoundSchema -func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) FromNetworkNotFoundSchema(v NetworkNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeNetworkNotFoundSchema performs a merge with any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res, using the provided NetworkNotFoundSchema -func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) MergeNetworkNotFoundSchema(v NetworkNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfNetworkNotFoundOrganizationNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsVirtualMachineNetworkInterfaceNotFoundSchema returns the union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a VirtualMachineNetworkInterfaceNotFoundSchema -func (t OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsVirtualMachineNetworkInterfaceNotFoundSchema() (VirtualMachineNetworkInterfaceNotFoundSchema, error) { - var body VirtualMachineNetworkInterfaceNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachineNetworkInterfaceNotFoundSchema overwrites any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided VirtualMachineNetworkInterfaceNotFoundSchema -func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachineNetworkInterfaceNotFoundSchema performs a merge with any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided VirtualMachineNetworkInterfaceNotFoundSchema -func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsNetworkSpeedProfileNotFoundSchema returns the union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a NetworkSpeedProfileNotFoundSchema -func (t OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsNetworkSpeedProfileNotFoundSchema() (NetworkSpeedProfileNotFoundSchema, error) { - var body NetworkSpeedProfileNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromNetworkSpeedProfileNotFoundSchema overwrites any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided NetworkSpeedProfileNotFoundSchema -func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromNetworkSpeedProfileNotFoundSchema(v NetworkSpeedProfileNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeNetworkSpeedProfileNotFoundSchema performs a merge with any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided NetworkSpeedProfileNotFoundSchema -func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeNetworkSpeedProfileNotFoundSchema(v NetworkSpeedProfileNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsObjectInTrashSchema returns the union data inside the OneOfObjectInTrashTaskQueueingError406Res as a ObjectInTrashSchema -func (t OneOfObjectInTrashTaskQueueingError406Res) AsObjectInTrashSchema() (ObjectInTrashSchema, error) { - var body ObjectInTrashSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromObjectInTrashSchema overwrites any union data inside the OneOfObjectInTrashTaskQueueingError406Res as the provided ObjectInTrashSchema -func (t *OneOfObjectInTrashTaskQueueingError406Res) FromObjectInTrashSchema(v ObjectInTrashSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeObjectInTrashSchema performs a merge with any union data inside the OneOfObjectInTrashTaskQueueingError406Res, using the provided ObjectInTrashSchema -func (t *OneOfObjectInTrashTaskQueueingError406Res) MergeObjectInTrashSchema(v ObjectInTrashSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsTaskQueueingErrorSchema returns the union data inside the OneOfObjectInTrashTaskQueueingError406Res as a TaskQueueingErrorSchema -func (t OneOfObjectInTrashTaskQueueingError406Res) AsTaskQueueingErrorSchema() (TaskQueueingErrorSchema, error) { - var body TaskQueueingErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromTaskQueueingErrorSchema overwrites any union data inside the OneOfObjectInTrashTaskQueueingError406Res as the provided TaskQueueingErrorSchema -func (t *OneOfObjectInTrashTaskQueueingError406Res) FromTaskQueueingErrorSchema(v TaskQueueingErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeTaskQueueingErrorSchema performs a merge with any union data inside the OneOfObjectInTrashTaskQueueingError406Res, using the provided TaskQueueingErrorSchema -func (t *OneOfObjectInTrashTaskQueueingError406Res) MergeTaskQueueingErrorSchema(v TaskQueueingErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfObjectInTrashTaskQueueingError406Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfObjectInTrashTaskQueueingError406Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsObjectInTrashSchema returns the union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as a ObjectInTrashSchema -func (t OneOfObjectInTrashVirtualMachineMustBeStarted406Res) AsObjectInTrashSchema() (ObjectInTrashSchema, error) { - var body ObjectInTrashSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromObjectInTrashSchema overwrites any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as the provided ObjectInTrashSchema -func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) FromObjectInTrashSchema(v ObjectInTrashSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeObjectInTrashSchema performs a merge with any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res, using the provided ObjectInTrashSchema -func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) MergeObjectInTrashSchema(v ObjectInTrashSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsVirtualMachineMustBeStartedSchema returns the union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as a VirtualMachineMustBeStartedSchema -func (t OneOfObjectInTrashVirtualMachineMustBeStarted406Res) AsVirtualMachineMustBeStartedSchema() (VirtualMachineMustBeStartedSchema, error) { - var body VirtualMachineMustBeStartedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachineMustBeStartedSchema overwrites any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as the provided VirtualMachineMustBeStartedSchema -func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) FromVirtualMachineMustBeStartedSchema(v VirtualMachineMustBeStartedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachineMustBeStartedSchema performs a merge with any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res, using the provided VirtualMachineMustBeStartedSchema -func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) MergeVirtualMachineMustBeStartedSchema(v VirtualMachineMustBeStartedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfObjectInTrashVirtualMachineMustBeStarted406Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsOrganizationNotFoundSchema returns the union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as a OrganizationNotFoundSchema -func (t OneOfOperatingSystemNotFoundOrganizationNotFound404Res) AsOrganizationNotFoundSchema() (OrganizationNotFoundSchema, error) { - var body OrganizationNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationNotFoundSchema overwrites any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as the provided OrganizationNotFoundSchema -func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) FromOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationNotFoundSchema performs a merge with any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res, using the provided OrganizationNotFoundSchema -func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) MergeOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsOperatingSystemNotFoundSchema returns the union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as a OperatingSystemNotFoundSchema -func (t OneOfOperatingSystemNotFoundOrganizationNotFound404Res) AsOperatingSystemNotFoundSchema() (OperatingSystemNotFoundSchema, error) { - var body OperatingSystemNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOperatingSystemNotFoundSchema overwrites any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as the provided OperatingSystemNotFoundSchema -func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) FromOperatingSystemNotFoundSchema(v OperatingSystemNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOperatingSystemNotFoundSchema performs a merge with any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res, using the provided OperatingSystemNotFoundSchema -func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) MergeOperatingSystemNotFoundSchema(v OperatingSystemNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfOperatingSystemNotFoundOrganizationNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsOrganizationLimitReachedSchema returns the union data inside the OneOfOrganizationLimitReachedValidationError422Res as a OrganizationLimitReachedSchema -func (t OneOfOrganizationLimitReachedValidationError422Res) AsOrganizationLimitReachedSchema() (OrganizationLimitReachedSchema, error) { - var body OrganizationLimitReachedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationLimitReachedSchema overwrites any union data inside the OneOfOrganizationLimitReachedValidationError422Res as the provided OrganizationLimitReachedSchema -func (t *OneOfOrganizationLimitReachedValidationError422Res) FromOrganizationLimitReachedSchema(v OrganizationLimitReachedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationLimitReachedSchema performs a merge with any union data inside the OneOfOrganizationLimitReachedValidationError422Res, using the provided OrganizationLimitReachedSchema -func (t *OneOfOrganizationLimitReachedValidationError422Res) MergeOrganizationLimitReachedSchema(v OrganizationLimitReachedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsValidationErrorSchema returns the union data inside the OneOfOrganizationLimitReachedValidationError422Res as a ValidationErrorSchema -func (t OneOfOrganizationLimitReachedValidationError422Res) AsValidationErrorSchema() (ValidationErrorSchema, error) { - var body ValidationErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromValidationErrorSchema overwrites any union data inside the OneOfOrganizationLimitReachedValidationError422Res as the provided ValidationErrorSchema -func (t *OneOfOrganizationLimitReachedValidationError422Res) FromValidationErrorSchema(v ValidationErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeValidationErrorSchema performs a merge with any union data inside the OneOfOrganizationLimitReachedValidationError422Res, using the provided ValidationErrorSchema -func (t *OneOfOrganizationLimitReachedValidationError422Res) MergeValidationErrorSchema(v ValidationErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfOrganizationLimitReachedValidationError422Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfOrganizationLimitReachedValidationError422Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a UnauthorizedNetworkForAPITokenSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { - var body UnauthorizedNetworkForAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a InvalidAPITokenSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { - var body InvalidAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided InvalidAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided InvalidAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a ScopeNotGrantedErrorSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { - var body ScopeNotGrantedErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided ScopeNotGrantedErrorSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided ScopeNotGrantedErrorSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsOrganizationSuspendedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a OrganizationSuspendedSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsOrganizationSuspendedSchema() (OrganizationSuspendedSchema, error) { - var body OrganizationSuspendedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationSuspendedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided OrganizationSuspendedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationSuspendedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided OrganizationSuspendedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsOrganizationNotActivatedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a OrganizationNotActivatedSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsOrganizationNotActivatedSchema() (OrganizationNotActivatedSchema, error) { - var body OrganizationNotActivatedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationNotActivatedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided OrganizationNotActivatedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationNotActivatedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided OrganizationNotActivatedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a UnauthorizedNetworkForAPITokenSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { - var body UnauthorizedNetworkForAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a InvalidAPITokenSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { - var body InvalidAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided InvalidAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided InvalidAPITokenSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a ScopeNotGrantedErrorSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { - var body ScopeNotGrantedErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided ScopeNotGrantedErrorSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided ScopeNotGrantedErrorSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsOrganizationSuspendedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a OrganizationSuspendedSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsOrganizationSuspendedSchema() (OrganizationSuspendedSchema, error) { - var body OrganizationSuspendedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationSuspendedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided OrganizationSuspendedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationSuspendedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided OrganizationSuspendedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsOrganizationNotActivatedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a OrganizationNotActivatedSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsOrganizationNotActivatedSchema() (OrganizationNotActivatedSchema, error) { - var body OrganizationNotActivatedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationNotActivatedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided OrganizationNotActivatedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationNotActivatedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided OrganizationNotActivatedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPermissionDeniedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a PermissionDeniedSchema -func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { - var body PermissionDeniedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPermissionDeniedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided PermissionDeniedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided PermissionDeniedSchema -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a UnauthorizedNetworkForAPITokenSchema -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { - var body UnauthorizedNetworkForAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a InvalidAPITokenSchema -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { - var body InvalidAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided InvalidAPITokenSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided InvalidAPITokenSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a ScopeNotGrantedErrorSchema -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { - var body ScopeNotGrantedErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided ScopeNotGrantedErrorSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided ScopeNotGrantedErrorSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsOrganizationSuspendedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a OrganizationSuspendedSchema -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsOrganizationSuspendedSchema() (OrganizationSuspendedSchema, error) { - var body OrganizationSuspendedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationSuspendedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided OrganizationSuspendedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationSuspendedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided OrganizationSuspendedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsOrganizationNotActivatedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a OrganizationNotActivatedSchema -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsOrganizationNotActivatedSchema() (OrganizationNotActivatedSchema, error) { - var body OrganizationNotActivatedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromOrganizationNotActivatedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided OrganizationNotActivatedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeOrganizationNotActivatedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided OrganizationNotActivatedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPermissionDeniedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a PermissionDeniedSchema -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { - var body PermissionDeniedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPermissionDeniedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided PermissionDeniedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided PermissionDeniedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsResourceCreationRestrictedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a ResourceCreationRestrictedSchema -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsResourceCreationRestrictedSchema() (ResourceCreationRestrictedSchema, error) { - var body ResourceCreationRestrictedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromResourceCreationRestrictedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided ResourceCreationRestrictedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromResourceCreationRestrictedSchema(v ResourceCreationRestrictedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeResourceCreationRestrictedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided ResourceCreationRestrictedSchema -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeResourceCreationRestrictedSchema(v ResourceCreationRestrictedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfPermissionDenied403Res as a UnauthorizedNetworkForAPITokenSchema -func (t OneOfPermissionDenied403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { - var body UnauthorizedNetworkForAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfPermissionDenied403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided UnauthorizedNetworkForAPITokenSchema -func (t *OneOfPermissionDenied403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsInvalidAPITokenSchema returns the union data inside the OneOfPermissionDenied403Res as a InvalidAPITokenSchema -func (t OneOfPermissionDenied403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { - var body InvalidAPITokenSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromInvalidAPITokenSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided InvalidAPITokenSchema -func (t *OneOfPermissionDenied403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided InvalidAPITokenSchema -func (t *OneOfPermissionDenied403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfPermissionDenied403Res as a ScopeNotGrantedErrorSchema -func (t OneOfPermissionDenied403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { - var body ScopeNotGrantedErrorSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided ScopeNotGrantedErrorSchema -func (t *OneOfPermissionDenied403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided ScopeNotGrantedErrorSchema -func (t *OneOfPermissionDenied403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsPermissionDeniedSchema returns the union data inside the OneOfPermissionDenied403Res as a PermissionDeniedSchema -func (t OneOfPermissionDenied403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { - var body PermissionDeniedSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromPermissionDeniedSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided PermissionDeniedSchema -func (t *OneOfPermissionDenied403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided PermissionDeniedSchema -func (t *OneOfPermissionDenied403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfPermissionDenied403Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfPermissionDenied403Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -// AsVirtualMachineNotFoundSchema returns the union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as a VirtualMachineNotFoundSchema -func (t OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) AsVirtualMachineNotFoundSchema() (VirtualMachineNotFoundSchema, error) { - var body VirtualMachineNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachineNotFoundSchema overwrites any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as the provided VirtualMachineNotFoundSchema -func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) FromVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachineNotFoundSchema performs a merge with any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res, using the provided VirtualMachineNotFoundSchema -func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) MergeVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -// AsVirtualMachinePackageNotFoundSchema returns the union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as a VirtualMachinePackageNotFoundSchema -func (t OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) AsVirtualMachinePackageNotFoundSchema() (VirtualMachinePackageNotFoundSchema, error) { - var body VirtualMachinePackageNotFoundSchema - err := json.Unmarshal(t.union, &body) - return body, err -} - -// FromVirtualMachinePackageNotFoundSchema overwrites any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as the provided VirtualMachinePackageNotFoundSchema -func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) FromVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { - b, err := json.Marshal(v) - t.union = b - return err -} - -// MergeVirtualMachinePackageNotFoundSchema performs a merge with any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res, using the provided VirtualMachinePackageNotFoundSchema -func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) MergeVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { - b, err := json.Marshal(v) - if err != nil { - return err - } - - merged, err := runtime.JSONMerge(t.union, b) - t.union = merged - return err -} - -func (t OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) MarshalJSON() ([]byte, error) { - b, err := t.union.MarshalJSON() - return b, err -} - -func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) UnmarshalJSON(b []byte) error { - err := t.union.UnmarshalJSON(b) - return err -} - -const ( - clientVersion = "0.2.0" // x-release-please-version -) - -// RequestEditorFn is the function signature for the RequestEditor callback function -type RequestEditorFn func(ctx context.Context, req *http.Request) error - -// Doer performs HTTP requests. -// -// The standard http.Client implements this interface. -type HttpRequestDoer interface { - Do(req *http.Request) (*http.Response, error) -} - -// Client which conforms to the OpenAPI3 specification for this service. -type Client struct { - // The endpoint of the server conforming to this interface, with scheme, - // https://api.deepmap.com for example. This can contain a path relative - // to the server, such as https://api.deepmap.com/dev-test, and all the - // paths in the swagger spec will be appended to the server. - Server string - - // Doer for performing requests, typically a *http.Client with any - // customized settings, such as certificate chains. - Client HttpRequestDoer - - // A list of callbacks for modifying requests which are generated before sending over - // the network. - RequestEditors []RequestEditorFn -} - -// ClientOption allows setting custom parameters during construction -type ClientOption func(*Client) error - -// Creates a new Client, with reasonable defaults -func NewClient(server string, token string, opts ...ClientOption) (*Client, error) { - // create a client with sane default values - client := Client{ - Server: server, - } - - bearerTokenProvider, bearerTokenProviderErr := securityprovider.NewSecurityProviderBearerToken(token) - if bearerTokenProviderErr != nil { - return nil, bearerTokenProviderErr - } - - client.RequestEditors = append(client.RequestEditors, bearerTokenProvider.Intercept) - client.RequestEditors = append(client.RequestEditors, func(ctx context.Context, req *http.Request) error { - req.Header.Set("User-Agent", "go-katapult/"+clientVersion) - - return nil - }) - - // mutate client and add all optional params - for _, o := range opts { - if err := o(&client); err != nil { - return nil, err - } - } - - // ensure the server URL always has a trailing slash - if !strings.HasSuffix(client.Server, "/") { - client.Server += "/" - } - // create httpClient, if not already present - if client.Client == nil { - client.Client = &http.Client{} - } - return &client, nil -} - -// WithHTTPClient allows overriding the default Doer, which is -// automatically created using http.Client. This is useful for tests. -func WithHTTPClient(doer HttpRequestDoer) ClientOption { - return func(c *Client) error { - c.Client = doer - return nil - } -} - -// WithRequestEditorFn allows setting up a callback function, which will be -// called right before sending the request. This can be used to mutate the request. -func WithRequestEditorFn(fn RequestEditorFn) ClientOption { - return func(c *Client) error { - c.RequestEditors = append(c.RequestEditors, fn) - return nil - } -} - -// The interface specification for the client above. -type ClientInterface interface { - // GetCertificate request - GetCertificate(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetCountries request - GetCountries(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetCountry request - GetCountry(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetCountryCountryStates request - GetCountryCountryStates(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetCountryState request - GetCountryState(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetCurrencies request - GetCurrencies(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetCurrency request - GetCurrency(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDataCenters request - GetDataCenters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDataCenter request - GetDataCenter(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDataCenterDefaultNetwork request - GetDataCenterDefaultNetwork(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDataCenterGpuTypes request - GetDataCenterGpuTypes(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteDiskBackupPolicyWithBody request with any body - DeleteDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteDiskBackupPolicy(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDiskBackupPolicy request - GetDiskBackupPolicy(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchDiskBackupPolicyWithBody request with any body - PatchDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchDiskBackupPolicy(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteDiskBackupPolicyScheduleWithBody request with any body - DeleteDiskBackupPolicyScheduleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteDiskBackupPolicySchedule(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDiskTemplateVersion request - GetDiskTemplateVersion(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDiskTemplateVersionSpec request - GetDiskTemplateVersionSpec(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDiskTemplate request - GetDiskTemplate(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDiskTemplateVersions request - GetDiskTemplateVersions(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDisk request - GetDisk(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDiskDiskBackupPolicies request - GetDiskDiskBackupPolicies(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostDiskDiskBackupPoliciesWithBody request with any body - PostDiskDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostDiskDiskBackupPolicies(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteDnsRecordWithBody request with any body - DeleteDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteDnsRecord(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDnsRecord request - GetDnsRecord(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchDnsRecordWithBody request with any body - PatchDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchDnsRecord(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteDnsZoneWithBody request with any body - DeleteDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteDnsZone(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDnsZone request - GetDnsZone(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchDnsZoneWithBody request with any body - PatchDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchDnsZone(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetDnsZoneRecords request - GetDnsZoneRecords(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostDnsZoneRecordsWithBody request with any body - PostDnsZoneRecordsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostDnsZoneRecords(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostDnsZoneVerifyWithBody request with any body - PostDnsZoneVerifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostDnsZoneVerify(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteFileStorageVolumeWithBody request with any body - DeleteFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteFileStorageVolume(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetFileStorageVolume request - GetFileStorageVolume(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchFileStorageVolumeWithBody request with any body - PatchFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchFileStorageVolume(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetGpuTypes request - GetGpuTypes(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetGpuType request - GetGpuType(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostInvalidateLinkedWebSessionWithBody request with any body - PostInvalidateLinkedWebSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostInvalidateLinkedWebSession(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteIpAddressWithBody request with any body - DeleteIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteIpAddress(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetIpAddress request - GetIpAddress(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchIpAddressWithBody request with any body - PatchIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchIpAddress(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostIpAddressUnallocateWithBody request with any body - PostIpAddressUnallocateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostIpAddressUnallocate(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteLoadBalancerWithBody request with any body - DeleteLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteLoadBalancer(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetLoadBalancer request - GetLoadBalancer(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchLoadBalancerWithBody request with any body - PatchLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchLoadBalancer(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetLoadBalancerRules request - GetLoadBalancerRules(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostLoadBalancerRulesWithBody request with any body - PostLoadBalancerRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostLoadBalancerRules(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteLoadBalancersRulesLoadBalancerRuleWithBody request with any body - DeleteLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteLoadBalancersRulesLoadBalancerRule(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetLoadBalancersRulesLoadBalancerRule request - GetLoadBalancersRulesLoadBalancerRule(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchLoadBalancersRulesLoadBalancerRuleWithBody request with any body - PatchLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchLoadBalancersRulesLoadBalancerRule(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetNetwork request - GetNetwork(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOperatingSystems request - GetOperatingSystems(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOperatingSystem request - GetOperatingSystem(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizations request - GetOrganizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganization request - GetOrganization(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationAvailableNetworks request - GetOrganizationAvailableNetworks(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationCertificates request - GetOrganizationCertificates(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationDiskBackupPolicies request - GetOrganizationDiskBackupPolicies(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationDiskTemplates request - GetOrganizationDiskTemplates(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationDisks request - GetOrganizationDisks(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationDnsZones request - GetOrganizationDnsZones(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationDnsZonesWithBody request with any body - PostOrganizationDnsZonesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationDnsZones(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationDnsZonesNameservers request - GetOrganizationDnsZonesNameservers(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationFileStorageVolumes request - GetOrganizationFileStorageVolumes(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationFileStorageVolumesWithBody request with any body - PostOrganizationFileStorageVolumesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationFileStorageVolumes(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationIpAddresses request - GetOrganizationIpAddresses(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationIpAddressesWithBody request with any body - PostOrganizationIpAddressesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationIpAddresses(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationLoadBalancers request - GetOrganizationLoadBalancers(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationLoadBalancersWithBody request with any body - PostOrganizationLoadBalancersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationLoadBalancers(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationManaged request - GetOrganizationManaged(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationManagedWithBody request with any body - PostOrganizationManagedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationManaged(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationNetworkSpeedProfiles request - GetOrganizationNetworkSpeedProfiles(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationSecurityGroups request - GetOrganizationSecurityGroups(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationSecurityGroupsWithBody request with any body - PostOrganizationSecurityGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationSecurityGroups(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationSshKeys request - GetOrganizationSshKeys(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationSshKeysWithBody request with any body - PostOrganizationSshKeysWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationSshKeys(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationTags request - GetOrganizationTags(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationTagsWithBody request with any body - PostOrganizationTagsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationTags(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationTrashObjects request - GetOrganizationTrashObjects(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationTrashObjectsPurgeAllWithBody request with any body - PostOrganizationTrashObjectsPurgeAllWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationTrashObjectsPurgeAll(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationUsersWithAccess request - GetOrganizationUsersWithAccess(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationVirtualMachineGroups request - GetOrganizationVirtualMachineGroups(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationVirtualMachineGroupsWithBody request with any body - PostOrganizationVirtualMachineGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationVirtualMachineGroups(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetOrganizationVirtualMachines request - GetOrganizationVirtualMachines(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationVirtualMachinesBuildWithBody request with any body - PostOrganizationVirtualMachinesBuildWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationVirtualMachinesBuild(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostOrganizationVirtualMachinesBuildFromSpecWithBody request with any body - PostOrganizationVirtualMachinesBuildFromSpecWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostOrganizationVirtualMachinesBuildFromSpec(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSecurityGroupWithBody request with any body - DeleteSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteSecurityGroup(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSecurityGroup request - GetSecurityGroup(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchSecurityGroupWithBody request with any body - PatchSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchSecurityGroup(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSecurityGroupRules request - GetSecurityGroupRules(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostSecurityGroupRulesWithBody request with any body - PostSecurityGroupRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostSecurityGroupRules(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSecurityGroupsRulesSecurityGroupRuleWithBody request with any body - DeleteSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetSecurityGroupsRulesSecurityGroupRule request - GetSecurityGroupsRulesSecurityGroupRule(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchSecurityGroupsRulesSecurityGroupRuleWithBody request with any body - PatchSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteSshKeyWithBody request with any body - DeleteSshKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteSshKey(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteTagWithBody request with any body - DeleteTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteTag(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetTag request - GetTag(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchTagWithBody request with any body - PatchTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchTag(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetTask request - GetTask(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteTrashObjectWithBody request with any body - DeleteTrashObjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteTrashObject(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetTrashObject request - GetTrashObject(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostTrashObjectRestoreWithBody request with any body - PostTrashObjectRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostTrashObjectRestore(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetUsersCurrent request - GetUsersCurrent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteVirtualMachineGroupWithBody request with any body - DeleteVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteVirtualMachineGroup(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachineGroup request - GetVirtualMachineGroup(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchVirtualMachineGroupWithBody request with any body - PatchVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchVirtualMachineGroup(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVMNIVMNI request - GetVMNIVMNI(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineNetworkInterfaceAllocateIpWithBody request with any body - PostVirtualMachineNetworkInterfaceAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineNetworkInterfaceAllocateIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody request with any body - PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineNetworkInterfaceAllocateNewIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion request - GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody request with any body - PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachinePackages request - GetVirtualMachinePackages(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachinePackage request - GetVirtualMachinePackage(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // DeleteVirtualMachineWithBody request with any body - DeleteVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - DeleteVirtualMachine(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachine request - GetVirtualMachine(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PatchVirtualMachineWithBody request with any body - PatchVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PatchVirtualMachine(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineAllocateIpWithBody request with any body - PostVirtualMachineAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineAllocateIp(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineConsoleSessionsWithBody request with any body - PostVirtualMachineConsoleSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineConsoleSessions(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachineDiskBackupPolicies request - GetVirtualMachineDiskBackupPolicies(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineDiskBackupPoliciesWithBody request with any body - PostVirtualMachineDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineDiskBackupPolicies(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachineDisks request - GetVirtualMachineDisks(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PutVirtualMachineFlexibleResourcesWithBody request with any body - PutVirtualMachineFlexibleResourcesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PutVirtualMachineFlexibleResources(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachineNetworkInterfaces request - GetVirtualMachineNetworkInterfaces(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachineNetworkInterface request - GetVirtualMachineNetworkInterface(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PutVirtualMachinePackageWithBody request with any body - PutVirtualMachinePackageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PutVirtualMachinePackage(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineResetWithBody request with any body - PostVirtualMachineResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineReset(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineShutdownWithBody request with any body - PostVirtualMachineShutdownWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineShutdown(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineStartWithBody request with any body - PostVirtualMachineStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineStart(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // PostVirtualMachineStopWithBody request with any body - PostVirtualMachineStopWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - - PostVirtualMachineStop(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetVirtualMachinesBuildsVirtualMachineBuild request - GetVirtualMachinesBuildsVirtualMachineBuild(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetZones request - GetZones(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - - // GetZone request - GetZone(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) -} - -func (c *Client) GetCertificate(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCertificateRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetCountries(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCountriesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetCountry(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCountryRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetCountryCountryStates(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCountryCountryStatesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetCountryState(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCountryStateRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetCurrencies(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrenciesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetCurrency(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetCurrencyRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDataCenters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDataCentersRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDataCenter(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDataCenterRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDataCenterDefaultNetwork(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDataCenterDefaultNetworkRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDataCenterGpuTypes(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDataCenterGpuTypesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDiskBackupPolicyRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDiskBackupPolicy(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDiskBackupPolicyRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDiskBackupPolicy(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDiskBackupPolicyRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchDiskBackupPolicyRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchDiskBackupPolicy(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchDiskBackupPolicyRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDiskBackupPolicyScheduleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDiskBackupPolicyScheduleRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDiskBackupPolicySchedule(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDiskBackupPolicyScheduleRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDiskTemplateVersion(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDiskTemplateVersionRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDiskTemplateVersionSpec(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDiskTemplateVersionSpecRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDiskTemplate(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDiskTemplateRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDiskTemplateVersions(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDiskTemplateVersionsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDisk(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDiskRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDiskDiskBackupPolicies(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDiskDiskBackupPoliciesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostDiskDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostDiskDiskBackupPoliciesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostDiskDiskBackupPolicies(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostDiskDiskBackupPoliciesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDnsRecordRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDnsRecord(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDnsRecordRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDnsRecord(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDnsRecordRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchDnsRecordRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchDnsRecord(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchDnsRecordRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDnsZoneRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteDnsZone(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDnsZoneRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDnsZone(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDnsZoneRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchDnsZoneRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchDnsZone(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchDnsZoneRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetDnsZoneRecords(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDnsZoneRecordsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostDnsZoneRecordsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostDnsZoneRecordsRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostDnsZoneRecords(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostDnsZoneRecordsRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostDnsZoneVerifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostDnsZoneVerifyRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostDnsZoneVerify(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostDnsZoneVerifyRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteFileStorageVolumeRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteFileStorageVolume(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteFileStorageVolumeRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetFileStorageVolume(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetFileStorageVolumeRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchFileStorageVolumeRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchFileStorageVolume(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchFileStorageVolumeRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetGpuTypes(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetGpuTypesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetGpuType(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetGpuTypeRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostInvalidateLinkedWebSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostInvalidateLinkedWebSessionRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostInvalidateLinkedWebSession(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostInvalidateLinkedWebSessionRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteIpAddressRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteIpAddress(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteIpAddressRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetIpAddress(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetIpAddressRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchIpAddressRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchIpAddress(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchIpAddressRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostIpAddressUnallocateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostIpAddressUnallocateRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostIpAddressUnallocate(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostIpAddressUnallocateRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteLoadBalancerRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteLoadBalancer(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteLoadBalancerRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetLoadBalancer(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetLoadBalancerRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchLoadBalancerRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchLoadBalancer(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchLoadBalancerRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetLoadBalancerRules(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetLoadBalancerRulesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostLoadBalancerRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostLoadBalancerRulesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostLoadBalancerRules(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostLoadBalancerRulesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteLoadBalancersRulesLoadBalancerRule(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteLoadBalancersRulesLoadBalancerRuleRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetLoadBalancersRulesLoadBalancerRule(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetLoadBalancersRulesLoadBalancerRuleRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchLoadBalancersRulesLoadBalancerRule(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchLoadBalancersRulesLoadBalancerRuleRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetNetwork(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetNetworkRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOperatingSystems(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOperatingSystemsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOperatingSystem(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOperatingSystemRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationsRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganization(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationAvailableNetworks(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationAvailableNetworksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationCertificates(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationCertificatesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationDiskBackupPolicies(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationDiskBackupPoliciesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationDiskTemplates(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationDiskTemplatesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationDisks(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationDisksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationDnsZones(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationDnsZonesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationDnsZonesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationDnsZonesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationDnsZones(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationDnsZonesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationDnsZonesNameservers(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationDnsZonesNameserversRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationFileStorageVolumes(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationFileStorageVolumesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationFileStorageVolumesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationFileStorageVolumesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationFileStorageVolumes(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationFileStorageVolumesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationIpAddresses(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationIpAddressesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationIpAddressesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationIpAddressesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationIpAddresses(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationIpAddressesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationLoadBalancers(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationLoadBalancersRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationLoadBalancersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationLoadBalancersRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationLoadBalancers(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationLoadBalancersRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationManaged(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationManagedRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationManagedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationManagedRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationManaged(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationManagedRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationNetworkSpeedProfiles(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationNetworkSpeedProfilesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationSecurityGroups(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationSecurityGroupsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationSecurityGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationSecurityGroupsRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationSecurityGroups(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationSecurityGroupsRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationSshKeys(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationSshKeysRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationSshKeysWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationSshKeysRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationSshKeys(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationSshKeysRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationTags(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationTagsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationTagsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationTagsRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationTags(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationTagsRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationTrashObjects(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationTrashObjectsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationTrashObjectsPurgeAllWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationTrashObjectsPurgeAllRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationTrashObjectsPurgeAll(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationTrashObjectsPurgeAllRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationUsersWithAccess(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationUsersWithAccessRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationVirtualMachineGroups(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationVirtualMachineGroupsRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationVirtualMachineGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationVirtualMachineGroupsRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationVirtualMachineGroups(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationVirtualMachineGroupsRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetOrganizationVirtualMachines(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetOrganizationVirtualMachinesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationVirtualMachinesBuildWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationVirtualMachinesBuildRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationVirtualMachinesBuild(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationVirtualMachinesBuildRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationVirtualMachinesBuildFromSpecWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostOrganizationVirtualMachinesBuildFromSpec(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostOrganizationVirtualMachinesBuildFromSpecRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSecurityGroupRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteSecurityGroup(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSecurityGroupRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetSecurityGroup(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSecurityGroupRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchSecurityGroupRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchSecurityGroup(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchSecurityGroupRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetSecurityGroupRules(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSecurityGroupRulesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostSecurityGroupRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostSecurityGroupRulesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostSecurityGroupRules(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostSecurityGroupRulesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSecurityGroupsRulesSecurityGroupRuleRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetSecurityGroupsRulesSecurityGroupRule(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetSecurityGroupsRulesSecurityGroupRuleRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchSecurityGroupsRulesSecurityGroupRuleRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteSshKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSshKeyRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteSshKey(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteSshKeyRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTagRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteTag(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTagRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetTag(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTagRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchTagRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchTag(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchTagRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetTask(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTaskRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteTrashObjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTrashObjectRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteTrashObject(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteTrashObjectRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetTrashObject(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTrashObjectRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostTrashObjectRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostTrashObjectRestoreRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostTrashObjectRestore(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostTrashObjectRestoreRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetUsersCurrent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetUsersCurrentRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteVirtualMachineGroupRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteVirtualMachineGroup(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteVirtualMachineGroupRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachineGroup(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachineGroupRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchVirtualMachineGroupRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchVirtualMachineGroup(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchVirtualMachineGroupRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVMNIVMNI(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVMNIVMNIRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineNetworkInterfaceAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineNetworkInterfaceAllocateIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineNetworkInterfaceAllocateIpRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineNetworkInterfaceAllocateNewIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachinePackages(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachinePackagesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachinePackage(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachinePackageRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteVirtualMachineRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) DeleteVirtualMachine(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteVirtualMachineRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachine(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachineRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchVirtualMachineRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PatchVirtualMachine(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPatchVirtualMachineRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineAllocateIpRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineAllocateIp(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineAllocateIpRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineConsoleSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineConsoleSessionsRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineConsoleSessions(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineConsoleSessionsRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachineDiskBackupPolicies(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachineDiskBackupPoliciesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineDiskBackupPoliciesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineDiskBackupPolicies(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineDiskBackupPoliciesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachineDisks(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachineDisksRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PutVirtualMachineFlexibleResourcesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPutVirtualMachineFlexibleResourcesRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PutVirtualMachineFlexibleResources(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPutVirtualMachineFlexibleResourcesRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachineNetworkInterfaces(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachineNetworkInterfacesRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachineNetworkInterface(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachineNetworkInterfaceRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PutVirtualMachinePackageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPutVirtualMachinePackageRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PutVirtualMachinePackage(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPutVirtualMachinePackageRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineResetRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineReset(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineResetRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineShutdownWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineShutdownRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineShutdown(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineShutdownRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineStartRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineStart(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineStartRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineStopWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineStopRequestWithBody(c.Server, contentType, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) PostVirtualMachineStop(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewPostVirtualMachineStopRequest(c.Server, body) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetVirtualMachinesBuildsVirtualMachineBuild(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVirtualMachinesBuildsVirtualMachineBuildRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetZones(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetZonesRequest(c.Server) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -func (c *Client) GetZone(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetZoneRequest(c.Server, params) - if err != nil { - return nil, err - } - req = req.WithContext(ctx) - if err := c.applyEditors(ctx, req, reqEditors); err != nil { - return nil, err - } - return c.Client.Do(req) -} - -// NewGetCertificateRequest generates requests for GetCertificate -func NewGetCertificateRequest(server string, params *GetCertificateParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/certificates/:certificate") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.CertificateId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "certificate[id]", runtime.ParamLocationQuery, *params.CertificateId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCountriesRequest generates requests for GetCountries -func NewGetCountriesRequest(server string, params *GetCountriesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/countries") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCountryRequest generates requests for GetCountry -func NewGetCountryRequest(server string, params *GetCountryParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/countries/:country") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.CountryId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[id]", runtime.ParamLocationQuery, *params.CountryId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CountryIsoCode2 != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code2]", runtime.ParamLocationQuery, *params.CountryIsoCode2); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CountryIsoCode3 != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code3]", runtime.ParamLocationQuery, *params.CountryIsoCode3); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCountryCountryStatesRequest generates requests for GetCountryCountryStates -func NewGetCountryCountryStatesRequest(server string, params *GetCountryCountryStatesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/countries/:country/country_states") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.CountryId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[id]", runtime.ParamLocationQuery, *params.CountryId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CountryIsoCode2 != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code2]", runtime.ParamLocationQuery, *params.CountryIsoCode2); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CountryIsoCode3 != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code3]", runtime.ParamLocationQuery, *params.CountryIsoCode3); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCountryStateRequest generates requests for GetCountryState -func NewGetCountryStateRequest(server string, params *GetCountryStateParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/country_states/:country_state") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.CountryStateId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country_state[id]", runtime.ParamLocationQuery, *params.CountryStateId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCurrenciesRequest generates requests for GetCurrencies -func NewGetCurrenciesRequest(server string, params *GetCurrenciesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/currencies") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetCurrencyRequest generates requests for GetCurrency -func NewGetCurrencyRequest(server string, params *GetCurrencyParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/currencies/:currency") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.CurrencyId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "currency[id]", runtime.ParamLocationQuery, *params.CurrencyId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.CurrencyIsoCode != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "currency[iso_code]", runtime.ParamLocationQuery, *params.CurrencyIsoCode); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDataCentersRequest generates requests for GetDataCenters -func NewGetDataCentersRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/data_centers") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDataCenterRequest generates requests for GetDataCenter -func NewGetDataCenterRequest(server string, params *GetDataCenterParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/data_centers/:data_center") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DataCenterId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[id]", runtime.ParamLocationQuery, *params.DataCenterId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DataCenterPermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[permalink]", runtime.ParamLocationQuery, *params.DataCenterPermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDataCenterDefaultNetworkRequest generates requests for GetDataCenterDefaultNetwork -func NewGetDataCenterDefaultNetworkRequest(server string, params *GetDataCenterDefaultNetworkParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/data_centers/:data_center/default_network") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DataCenterId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[id]", runtime.ParamLocationQuery, *params.DataCenterId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DataCenterPermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[permalink]", runtime.ParamLocationQuery, *params.DataCenterPermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDataCenterGpuTypesRequest generates requests for GetDataCenterGpuTypes -func NewGetDataCenterGpuTypesRequest(server string, params *GetDataCenterGpuTypesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/data_centers/:data_center/gpu_types") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DataCenterId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[id]", runtime.ParamLocationQuery, *params.DataCenterId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DataCenterPermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[permalink]", runtime.ParamLocationQuery, *params.DataCenterPermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteDiskBackupPolicyRequest calls the generic DeleteDiskBackupPolicy builder with application/json body -func NewDeleteDiskBackupPolicyRequest(server string, body DeleteDiskBackupPolicyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteDiskBackupPolicyRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteDiskBackupPolicyRequestWithBody generates requests for DeleteDiskBackupPolicy with any type of body -func NewDeleteDiskBackupPolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetDiskBackupPolicyRequest generates requests for GetDiskBackupPolicy -func NewGetDiskBackupPolicyRequest(server string, params *GetDiskBackupPolicyParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DiskBackupPolicyId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_backup_policy[id]", runtime.ParamLocationQuery, *params.DiskBackupPolicyId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchDiskBackupPolicyRequest calls the generic PatchDiskBackupPolicy builder with application/json body -func NewPatchDiskBackupPolicyRequest(server string, body PatchDiskBackupPolicyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchDiskBackupPolicyRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchDiskBackupPolicyRequestWithBody generates requests for PatchDiskBackupPolicy with any type of body -func NewPatchDiskBackupPolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteDiskBackupPolicyScheduleRequest calls the generic DeleteDiskBackupPolicySchedule builder with application/json body -func NewDeleteDiskBackupPolicyScheduleRequest(server string, body DeleteDiskBackupPolicyScheduleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteDiskBackupPolicyScheduleRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteDiskBackupPolicyScheduleRequestWithBody generates requests for DeleteDiskBackupPolicySchedule with any type of body -func NewDeleteDiskBackupPolicyScheduleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy/schedule") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetDiskTemplateVersionRequest generates requests for GetDiskTemplateVersion -func NewGetDiskTemplateVersionRequest(server string, params *GetDiskTemplateVersionParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_template_versions/:disk_template_version") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DiskTemplateVersionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template_version[id]", runtime.ParamLocationQuery, *params.DiskTemplateVersionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDiskTemplateVersionSpecRequest generates requests for GetDiskTemplateVersionSpec -func NewGetDiskTemplateVersionSpecRequest(server string, params *GetDiskTemplateVersionSpecParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_template_versions/:disk_template_version/spec") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DiskTemplateVersionId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template_version[id]", runtime.ParamLocationQuery, *params.DiskTemplateVersionId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDiskTemplateRequest generates requests for GetDiskTemplate -func NewGetDiskTemplateRequest(server string, params *GetDiskTemplateParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_templates/:disk_template") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DiskTemplateId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[id]", runtime.ParamLocationQuery, *params.DiskTemplateId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DiskTemplatePermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[permalink]", runtime.ParamLocationQuery, *params.DiskTemplatePermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDiskTemplateVersionsRequest generates requests for GetDiskTemplateVersions -func NewGetDiskTemplateVersionsRequest(server string, params *GetDiskTemplateVersionsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disk_templates/:disk_template/versions") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DiskTemplateId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[id]", runtime.ParamLocationQuery, *params.DiskTemplateId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DiskTemplatePermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[permalink]", runtime.ParamLocationQuery, *params.DiskTemplatePermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDiskRequest generates requests for GetDisk -func NewGetDiskRequest(server string, params *GetDiskParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disks/:disk") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DiskId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk[id]", runtime.ParamLocationQuery, *params.DiskId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetDiskDiskBackupPoliciesRequest generates requests for GetDiskDiskBackupPolicies -func NewGetDiskDiskBackupPoliciesRequest(server string, params *GetDiskDiskBackupPoliciesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disks/:disk/disk_backup_policies") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DiskId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk[id]", runtime.ParamLocationQuery, *params.DiskId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostDiskDiskBackupPoliciesRequest calls the generic PostDiskDiskBackupPolicies builder with application/json body -func NewPostDiskDiskBackupPoliciesRequest(server string, body PostDiskDiskBackupPoliciesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostDiskDiskBackupPoliciesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostDiskDiskBackupPoliciesRequestWithBody generates requests for PostDiskDiskBackupPolicies with any type of body -func NewPostDiskDiskBackupPoliciesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/disks/:disk/disk_backup_policies") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteDnsRecordRequest calls the generic DeleteDnsRecord builder with application/json body -func NewDeleteDnsRecordRequest(server string, body DeleteDnsRecordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteDnsRecordRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteDnsRecordRequestWithBody generates requests for DeleteDnsRecord with any type of body -func NewDeleteDnsRecordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_records/:dns_record") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetDnsRecordRequest generates requests for GetDnsRecord -func NewGetDnsRecordRequest(server string, params *GetDnsRecordParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_records/:dns_record") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DnsRecordId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_record[id]", runtime.ParamLocationQuery, *params.DnsRecordId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchDnsRecordRequest calls the generic PatchDnsRecord builder with application/json body -func NewPatchDnsRecordRequest(server string, body PatchDnsRecordJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchDnsRecordRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchDnsRecordRequestWithBody generates requests for PatchDnsRecord with any type of body -func NewPatchDnsRecordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_records/:dns_record") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteDnsZoneRequest calls the generic DeleteDnsZone builder with application/json body -func NewDeleteDnsZoneRequest(server string, body DeleteDnsZoneJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteDnsZoneRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteDnsZoneRequestWithBody generates requests for DeleteDnsZone with any type of body -func NewDeleteDnsZoneRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_zones/:dns_zone") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetDnsZoneRequest generates requests for GetDnsZone -func NewGetDnsZoneRequest(server string, params *GetDnsZoneParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_zones/:dns_zone") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DnsZoneId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[id]", runtime.ParamLocationQuery, *params.DnsZoneId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DnsZoneName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[name]", runtime.ParamLocationQuery, *params.DnsZoneName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchDnsZoneRequest calls the generic PatchDnsZone builder with application/json body -func NewPatchDnsZoneRequest(server string, body PatchDnsZoneJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchDnsZoneRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchDnsZoneRequestWithBody generates requests for PatchDnsZone with any type of body -func NewPatchDnsZoneRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_zones/:dns_zone") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetDnsZoneRecordsRequest generates requests for GetDnsZoneRecords -func NewGetDnsZoneRecordsRequest(server string, params *GetDnsZoneRecordsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_zones/:dns_zone/records") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.DnsZoneId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[id]", runtime.ParamLocationQuery, *params.DnsZoneId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.DnsZoneName != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[name]", runtime.ParamLocationQuery, *params.DnsZoneName); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostDnsZoneRecordsRequest calls the generic PostDnsZoneRecords builder with application/json body -func NewPostDnsZoneRecordsRequest(server string, body PostDnsZoneRecordsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostDnsZoneRecordsRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostDnsZoneRecordsRequestWithBody generates requests for PostDnsZoneRecords with any type of body -func NewPostDnsZoneRecordsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_zones/:dns_zone/records") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostDnsZoneVerifyRequest calls the generic PostDnsZoneVerify builder with application/json body -func NewPostDnsZoneVerifyRequest(server string, body PostDnsZoneVerifyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostDnsZoneVerifyRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostDnsZoneVerifyRequestWithBody generates requests for PostDnsZoneVerify with any type of body -func NewPostDnsZoneVerifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/dns_zones/:dns_zone/verify") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteFileStorageVolumeRequest calls the generic DeleteFileStorageVolume builder with application/json body -func NewDeleteFileStorageVolumeRequest(server string, body DeleteFileStorageVolumeJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteFileStorageVolumeRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteFileStorageVolumeRequestWithBody generates requests for DeleteFileStorageVolume with any type of body -func NewDeleteFileStorageVolumeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/file_storage_volumes/:file_storage_volume") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetFileStorageVolumeRequest generates requests for GetFileStorageVolume -func NewGetFileStorageVolumeRequest(server string, params *GetFileStorageVolumeParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/file_storage_volumes/:file_storage_volume") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.FileStorageVolumeId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "file_storage_volume[id]", runtime.ParamLocationQuery, *params.FileStorageVolumeId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchFileStorageVolumeRequest calls the generic PatchFileStorageVolume builder with application/json body -func NewPatchFileStorageVolumeRequest(server string, body PatchFileStorageVolumeJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchFileStorageVolumeRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchFileStorageVolumeRequestWithBody generates requests for PatchFileStorageVolume with any type of body -func NewPatchFileStorageVolumeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/file_storage_volumes/:file_storage_volume") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetGpuTypesRequest generates requests for GetGpuTypes -func NewGetGpuTypesRequest(server string, params *GetGpuTypesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gpu_types") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetGpuTypeRequest generates requests for GetGpuType -func NewGetGpuTypeRequest(server string, params *GetGpuTypeParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/gpu_types/:gpu_type") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.GpuTypeId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gpu_type[id]", runtime.ParamLocationQuery, *params.GpuTypeId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.GpuTypePermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gpu_type[permalink]", runtime.ParamLocationQuery, *params.GpuTypePermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostInvalidateLinkedWebSessionRequest calls the generic PostInvalidateLinkedWebSession builder with application/json body -func NewPostInvalidateLinkedWebSessionRequest(server string, body PostInvalidateLinkedWebSessionJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostInvalidateLinkedWebSessionRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostInvalidateLinkedWebSessionRequestWithBody generates requests for PostInvalidateLinkedWebSession with any type of body -func NewPostInvalidateLinkedWebSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/invalidate_linked_web_session") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteIpAddressRequest calls the generic DeleteIpAddress builder with application/json body -func NewDeleteIpAddressRequest(server string, body DeleteIpAddressJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteIpAddressRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteIpAddressRequestWithBody generates requests for DeleteIpAddress with any type of body -func NewDeleteIpAddressRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/ip_addresses/:ip_address") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetIpAddressRequest generates requests for GetIpAddress -func NewGetIpAddressRequest(server string, params *GetIpAddressParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/ip_addresses/:ip_address") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.IpAddressId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ip_address[id]", runtime.ParamLocationQuery, *params.IpAddressId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IpAddressAddress != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ip_address[address]", runtime.ParamLocationQuery, *params.IpAddressAddress); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchIpAddressRequest calls the generic PatchIpAddress builder with application/json body -func NewPatchIpAddressRequest(server string, body PatchIpAddressJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchIpAddressRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchIpAddressRequestWithBody generates requests for PatchIpAddress with any type of body -func NewPatchIpAddressRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/ip_addresses/:ip_address") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostIpAddressUnallocateRequest calls the generic PostIpAddressUnallocate builder with application/json body -func NewPostIpAddressUnallocateRequest(server string, body PostIpAddressUnallocateJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostIpAddressUnallocateRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostIpAddressUnallocateRequestWithBody generates requests for PostIpAddressUnallocate with any type of body -func NewPostIpAddressUnallocateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/ip_addresses/:ip_address/unallocate") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteLoadBalancerRequest calls the generic DeleteLoadBalancer builder with application/json body -func NewDeleteLoadBalancerRequest(server string, body DeleteLoadBalancerJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteLoadBalancerRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteLoadBalancerRequestWithBody generates requests for DeleteLoadBalancer with any type of body -func NewDeleteLoadBalancerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/:load_balancer") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetLoadBalancerRequest generates requests for GetLoadBalancer -func NewGetLoadBalancerRequest(server string, params *GetLoadBalancerParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/:load_balancer") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.LoadBalancerId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[id]", runtime.ParamLocationQuery, *params.LoadBalancerId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.LoadBalancerApiReference != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[api_reference]", runtime.ParamLocationQuery, *params.LoadBalancerApiReference); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchLoadBalancerRequest calls the generic PatchLoadBalancer builder with application/json body -func NewPatchLoadBalancerRequest(server string, body PatchLoadBalancerJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchLoadBalancerRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchLoadBalancerRequestWithBody generates requests for PatchLoadBalancer with any type of body -func NewPatchLoadBalancerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/:load_balancer") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetLoadBalancerRulesRequest generates requests for GetLoadBalancerRules -func NewGetLoadBalancerRulesRequest(server string, params *GetLoadBalancerRulesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/:load_balancer/rules") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.LoadBalancerId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[id]", runtime.ParamLocationQuery, *params.LoadBalancerId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.LoadBalancerApiReference != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[api_reference]", runtime.ParamLocationQuery, *params.LoadBalancerApiReference); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostLoadBalancerRulesRequest calls the generic PostLoadBalancerRules builder with application/json body -func NewPostLoadBalancerRulesRequest(server string, body PostLoadBalancerRulesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostLoadBalancerRulesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostLoadBalancerRulesRequestWithBody generates requests for PostLoadBalancerRules with any type of body -func NewPostLoadBalancerRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/:load_balancer/rules") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteLoadBalancersRulesLoadBalancerRuleRequest calls the generic DeleteLoadBalancersRulesLoadBalancerRule builder with application/json body -func NewDeleteLoadBalancersRulesLoadBalancerRuleRequest(server string, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody generates requests for DeleteLoadBalancersRulesLoadBalancerRule with any type of body -func NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/rules/:load_balancer_rule") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetLoadBalancersRulesLoadBalancerRuleRequest generates requests for GetLoadBalancersRulesLoadBalancerRule -func NewGetLoadBalancersRulesLoadBalancerRuleRequest(server string, params *GetLoadBalancersRulesLoadBalancerRuleParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/rules/:load_balancer_rule") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.LoadBalancerRuleId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer_rule[id]", runtime.ParamLocationQuery, *params.LoadBalancerRuleId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchLoadBalancersRulesLoadBalancerRuleRequest calls the generic PatchLoadBalancersRulesLoadBalancerRule builder with application/json body -func NewPatchLoadBalancersRulesLoadBalancerRuleRequest(server string, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody generates requests for PatchLoadBalancersRulesLoadBalancerRule with any type of body -func NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/load_balancers/rules/:load_balancer_rule") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetNetworkRequest generates requests for GetNetwork -func NewGetNetworkRequest(server string, params *GetNetworkParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/networks/:network") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[id]", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkPermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[permalink]", runtime.ParamLocationQuery, *params.NetworkPermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOperatingSystemsRequest generates requests for GetOperatingSystems -func NewGetOperatingSystemsRequest(server string, params *GetOperatingSystemsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/operating_systems") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOperatingSystemRequest generates requests for GetOperatingSystem -func NewGetOperatingSystemRequest(server string, params *GetOperatingSystemParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/operating_systems/:operating_system") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OperatingSystemId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "operating_system[id]", runtime.ParamLocationQuery, *params.OperatingSystemId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationsRequest generates requests for GetOrganizations -func NewGetOrganizationsRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationRequest generates requests for GetOrganization -func NewGetOrganizationRequest(server string, params *GetOrganizationParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationAvailableNetworksRequest generates requests for GetOrganizationAvailableNetworks -func NewGetOrganizationAvailableNetworksRequest(server string, params *GetOrganizationAvailableNetworksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/available_networks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationCertificatesRequest generates requests for GetOrganizationCertificates -func NewGetOrganizationCertificatesRequest(server string, params *GetOrganizationCertificatesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/certificates") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationDiskBackupPoliciesRequest generates requests for GetOrganizationDiskBackupPolicies -func NewGetOrganizationDiskBackupPoliciesRequest(server string, params *GetOrganizationDiskBackupPoliciesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/disk_backup_policies") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationDiskTemplatesRequest generates requests for GetOrganizationDiskTemplates -func NewGetOrganizationDiskTemplatesRequest(server string, params *GetOrganizationDiskTemplatesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/disk_templates") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludeUniversal != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_universal", runtime.ParamLocationQuery, *params.IncludeUniversal); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OperatingSystemId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "operating_system[id]", runtime.ParamLocationQuery, *params.OperatingSystemId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationDisksRequest generates requests for GetOrganizationDisks -func NewGetOrganizationDisksRequest(server string, params *GetOrganizationDisksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/disks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationDnsZonesRequest generates requests for GetOrganizationDnsZones -func NewGetOrganizationDnsZonesRequest(server string, params *GetOrganizationDnsZonesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/dns_zones") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationDnsZonesRequest calls the generic PostOrganizationDnsZones builder with application/json body -func NewPostOrganizationDnsZonesRequest(server string, body PostOrganizationDnsZonesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationDnsZonesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationDnsZonesRequestWithBody generates requests for PostOrganizationDnsZones with any type of body -func NewPostOrganizationDnsZonesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/dns_zones") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationDnsZonesNameserversRequest generates requests for GetOrganizationDnsZonesNameservers -func NewGetOrganizationDnsZonesNameserversRequest(server string, params *GetOrganizationDnsZonesNameserversParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/dns_zones/nameservers") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationFileStorageVolumesRequest generates requests for GetOrganizationFileStorageVolumes -func NewGetOrganizationFileStorageVolumesRequest(server string, params *GetOrganizationFileStorageVolumesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/file_storage_volumes") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationFileStorageVolumesRequest calls the generic PostOrganizationFileStorageVolumes builder with application/json body -func NewPostOrganizationFileStorageVolumesRequest(server string, body PostOrganizationFileStorageVolumesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationFileStorageVolumesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationFileStorageVolumesRequestWithBody generates requests for PostOrganizationFileStorageVolumes with any type of body -func NewPostOrganizationFileStorageVolumesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/file_storage_volumes") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationIpAddressesRequest generates requests for GetOrganizationIpAddresses -func NewGetOrganizationIpAddressesRequest(server string, params *GetOrganizationIpAddressesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/ip_addresses") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Allocated != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "allocated", runtime.ParamLocationQuery, *params.Allocated); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationIpAddressesRequest calls the generic PostOrganizationIpAddresses builder with application/json body -func NewPostOrganizationIpAddressesRequest(server string, body PostOrganizationIpAddressesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationIpAddressesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationIpAddressesRequestWithBody generates requests for PostOrganizationIpAddresses with any type of body -func NewPostOrganizationIpAddressesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/ip_addresses") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationLoadBalancersRequest generates requests for GetOrganizationLoadBalancers -func NewGetOrganizationLoadBalancersRequest(server string, params *GetOrganizationLoadBalancersParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/load_balancers") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationLoadBalancersRequest calls the generic PostOrganizationLoadBalancers builder with application/json body -func NewPostOrganizationLoadBalancersRequest(server string, body PostOrganizationLoadBalancersJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationLoadBalancersRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationLoadBalancersRequestWithBody generates requests for PostOrganizationLoadBalancers with any type of body -func NewPostOrganizationLoadBalancersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/load_balancers") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationManagedRequest generates requests for GetOrganizationManaged -func NewGetOrganizationManagedRequest(server string, params *GetOrganizationManagedParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/managed") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationManagedRequest calls the generic PostOrganizationManaged builder with application/json body -func NewPostOrganizationManagedRequest(server string, body PostOrganizationManagedJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationManagedRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationManagedRequestWithBody generates requests for PostOrganizationManaged with any type of body -func NewPostOrganizationManagedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/managed") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationNetworkSpeedProfilesRequest generates requests for GetOrganizationNetworkSpeedProfiles -func NewGetOrganizationNetworkSpeedProfilesRequest(server string, params *GetOrganizationNetworkSpeedProfilesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/network_speed_profiles") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationSecurityGroupsRequest generates requests for GetOrganizationSecurityGroups -func NewGetOrganizationSecurityGroupsRequest(server string, params *GetOrganizationSecurityGroupsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/security_groups") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationSecurityGroupsRequest calls the generic PostOrganizationSecurityGroups builder with application/json body -func NewPostOrganizationSecurityGroupsRequest(server string, body PostOrganizationSecurityGroupsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationSecurityGroupsRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationSecurityGroupsRequestWithBody generates requests for PostOrganizationSecurityGroups with any type of body -func NewPostOrganizationSecurityGroupsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/security_groups") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationSshKeysRequest generates requests for GetOrganizationSshKeys -func NewGetOrganizationSshKeysRequest(server string, params *GetOrganizationSshKeysParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/ssh_keys") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationSshKeysRequest calls the generic PostOrganizationSshKeys builder with application/json body -func NewPostOrganizationSshKeysRequest(server string, body PostOrganizationSshKeysJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationSshKeysRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationSshKeysRequestWithBody generates requests for PostOrganizationSshKeys with any type of body -func NewPostOrganizationSshKeysRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/ssh_keys") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationTagsRequest generates requests for GetOrganizationTags -func NewGetOrganizationTagsRequest(server string, params *GetOrganizationTagsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/tags") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationTagsRequest calls the generic PostOrganizationTags builder with application/json body -func NewPostOrganizationTagsRequest(server string, body PostOrganizationTagsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationTagsRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationTagsRequestWithBody generates requests for PostOrganizationTags with any type of body -func NewPostOrganizationTagsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/tags") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationTrashObjectsRequest generates requests for GetOrganizationTrashObjects -func NewGetOrganizationTrashObjectsRequest(server string, params *GetOrganizationTrashObjectsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/trash_objects") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationTrashObjectsPurgeAllRequest calls the generic PostOrganizationTrashObjectsPurgeAll builder with application/json body -func NewPostOrganizationTrashObjectsPurgeAllRequest(server string, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationTrashObjectsPurgeAllRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationTrashObjectsPurgeAllRequestWithBody generates requests for PostOrganizationTrashObjectsPurgeAll with any type of body -func NewPostOrganizationTrashObjectsPurgeAllRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/trash_objects/purge_all") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationUsersWithAccessRequest generates requests for GetOrganizationUsersWithAccess -func NewGetOrganizationUsersWithAccessRequest(server string, params *GetOrganizationUsersWithAccessParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/users_with_access") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetOrganizationVirtualMachineGroupsRequest generates requests for GetOrganizationVirtualMachineGroups -func NewGetOrganizationVirtualMachineGroupsRequest(server string, params *GetOrganizationVirtualMachineGroupsParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/virtual_machine_groups") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationVirtualMachineGroupsRequest calls the generic PostOrganizationVirtualMachineGroups builder with application/json body -func NewPostOrganizationVirtualMachineGroupsRequest(server string, body PostOrganizationVirtualMachineGroupsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationVirtualMachineGroupsRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationVirtualMachineGroupsRequestWithBody generates requests for PostOrganizationVirtualMachineGroups with any type of body -func NewPostOrganizationVirtualMachineGroupsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/virtual_machine_groups") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetOrganizationVirtualMachinesRequest generates requests for GetOrganizationVirtualMachines -func NewGetOrganizationVirtualMachinesRequest(server string, params *GetOrganizationVirtualMachinesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/virtual_machines") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostOrganizationVirtualMachinesBuildRequest calls the generic PostOrganizationVirtualMachinesBuild builder with application/json body -func NewPostOrganizationVirtualMachinesBuildRequest(server string, body PostOrganizationVirtualMachinesBuildJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationVirtualMachinesBuildRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationVirtualMachinesBuildRequestWithBody generates requests for PostOrganizationVirtualMachinesBuild with any type of body -func NewPostOrganizationVirtualMachinesBuildRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/virtual_machines/build") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostOrganizationVirtualMachinesBuildFromSpecRequest calls the generic PostOrganizationVirtualMachinesBuildFromSpec builder with application/json body -func NewPostOrganizationVirtualMachinesBuildFromSpecRequest(server string, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody generates requests for PostOrganizationVirtualMachinesBuildFromSpec with any type of body -func NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/organizations/:organization/virtual_machines/build_from_spec") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteSecurityGroupRequest calls the generic DeleteSecurityGroup builder with application/json body -func NewDeleteSecurityGroupRequest(server string, body DeleteSecurityGroupJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteSecurityGroupRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteSecurityGroupRequestWithBody generates requests for DeleteSecurityGroup with any type of body -func NewDeleteSecurityGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/:security_group") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetSecurityGroupRequest generates requests for GetSecurityGroup -func NewGetSecurityGroupRequest(server string, params *GetSecurityGroupParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/:security_group") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.SecurityGroupId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "security_group[id]", runtime.ParamLocationQuery, *params.SecurityGroupId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchSecurityGroupRequest calls the generic PatchSecurityGroup builder with application/json body -func NewPatchSecurityGroupRequest(server string, body PatchSecurityGroupJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchSecurityGroupRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchSecurityGroupRequestWithBody generates requests for PatchSecurityGroup with any type of body -func NewPatchSecurityGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/:security_group") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetSecurityGroupRulesRequest generates requests for GetSecurityGroupRules -func NewGetSecurityGroupRulesRequest(server string, params *GetSecurityGroupRulesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/:security_group/rules") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.SecurityGroupId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "security_group[id]", runtime.ParamLocationQuery, *params.SecurityGroupId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostSecurityGroupRulesRequest calls the generic PostSecurityGroupRules builder with application/json body -func NewPostSecurityGroupRulesRequest(server string, body PostSecurityGroupRulesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostSecurityGroupRulesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostSecurityGroupRulesRequestWithBody generates requests for PostSecurityGroupRules with any type of body -func NewPostSecurityGroupRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/:security_group/rules") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteSecurityGroupsRulesSecurityGroupRuleRequest calls the generic DeleteSecurityGroupsRulesSecurityGroupRule builder with application/json body -func NewDeleteSecurityGroupsRulesSecurityGroupRuleRequest(server string, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody generates requests for DeleteSecurityGroupsRulesSecurityGroupRule with any type of body -func NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/rules/:security_group_rule") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetSecurityGroupsRulesSecurityGroupRuleRequest generates requests for GetSecurityGroupsRulesSecurityGroupRule -func NewGetSecurityGroupsRulesSecurityGroupRuleRequest(server string, params *GetSecurityGroupsRulesSecurityGroupRuleParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/rules/:security_group_rule") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.SecurityGroupRuleId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "security_group_rule[id]", runtime.ParamLocationQuery, *params.SecurityGroupRuleId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchSecurityGroupsRulesSecurityGroupRuleRequest calls the generic PatchSecurityGroupsRulesSecurityGroupRule builder with application/json body -func NewPatchSecurityGroupsRulesSecurityGroupRuleRequest(server string, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody generates requests for PatchSecurityGroupsRulesSecurityGroupRule with any type of body -func NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/security_groups/rules/:security_group_rule") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteSshKeyRequest calls the generic DeleteSshKey builder with application/json body -func NewDeleteSshKeyRequest(server string, body DeleteSshKeyJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteSshKeyRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteSshKeyRequestWithBody generates requests for DeleteSshKey with any type of body -func NewDeleteSshKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/ssh_keys/:ssh_key") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewDeleteTagRequest calls the generic DeleteTag builder with application/json body -func NewDeleteTagRequest(server string, body DeleteTagJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteTagRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteTagRequestWithBody generates requests for DeleteTag with any type of body -func NewDeleteTagRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/tags/:tag") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetTagRequest generates requests for GetTag -func NewGetTagRequest(server string, params *GetTagParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/tags/:tag") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.TagId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tag[id]", runtime.ParamLocationQuery, *params.TagId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchTagRequest calls the generic PatchTag builder with application/json body -func NewPatchTagRequest(server string, body PatchTagJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchTagRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchTagRequestWithBody generates requests for PatchTag with any type of body -func NewPatchTagRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/tags/:tag") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetTaskRequest generates requests for GetTask -func NewGetTaskRequest(server string, params *GetTaskParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/tasks/:task") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.TaskId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "task[id]", runtime.ParamLocationQuery, *params.TaskId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteTrashObjectRequest calls the generic DeleteTrashObject builder with application/json body -func NewDeleteTrashObjectRequest(server string, body DeleteTrashObjectJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteTrashObjectRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteTrashObjectRequestWithBody generates requests for DeleteTrashObject with any type of body -func NewDeleteTrashObjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/trash_objects/:trash_object") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetTrashObjectRequest generates requests for GetTrashObject -func NewGetTrashObjectRequest(server string, params *GetTrashObjectParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/trash_objects/:trash_object") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.TrashObjectId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "trash_object[id]", runtime.ParamLocationQuery, *params.TrashObjectId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.TrashObjectObjectId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "trash_object[object_id]", runtime.ParamLocationQuery, *params.TrashObjectObjectId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostTrashObjectRestoreRequest calls the generic PostTrashObjectRestore builder with application/json body -func NewPostTrashObjectRestoreRequest(server string, body PostTrashObjectRestoreJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostTrashObjectRestoreRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostTrashObjectRestoreRequestWithBody generates requests for PostTrashObjectRestore with any type of body -func NewPostTrashObjectRestoreRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/trash_objects/:trash_object/restore") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetUsersCurrentRequest generates requests for GetUsersCurrent -func NewGetUsersCurrentRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/users/current") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteVirtualMachineGroupRequest calls the generic DeleteVirtualMachineGroup builder with application/json body -func NewDeleteVirtualMachineGroupRequest(server string, body DeleteVirtualMachineGroupJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteVirtualMachineGroupRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteVirtualMachineGroupRequestWithBody generates requests for DeleteVirtualMachineGroup with any type of body -func NewDeleteVirtualMachineGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_groups/:virtual_machine_group") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachineGroupRequest generates requests for GetVirtualMachineGroup -func NewGetVirtualMachineGroupRequest(server string, params *GetVirtualMachineGroupParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_groups/:virtual_machine_group") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineGroupId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_group[id]", runtime.ParamLocationQuery, *params.VirtualMachineGroupId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchVirtualMachineGroupRequest calls the generic PatchVirtualMachineGroup builder with application/json body -func NewPatchVirtualMachineGroupRequest(server string, body PatchVirtualMachineGroupJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchVirtualMachineGroupRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchVirtualMachineGroupRequestWithBody generates requests for PatchVirtualMachineGroup with any type of body -func NewPatchVirtualMachineGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_groups/:virtual_machine_group") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVMNIVMNIRequest generates requests for GetVMNIVMNI -func NewGetVMNIVMNIRequest(server string, params *GetVMNIVMNIParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineNetworkInterfaceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_network_interface[id]", runtime.ParamLocationQuery, *params.VirtualMachineNetworkInterfaceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostVirtualMachineNetworkInterfaceAllocateIpRequest calls the generic PostVirtualMachineNetworkInterfaceAllocateIp builder with application/json body -func NewPostVirtualMachineNetworkInterfaceAllocateIpRequest(server string, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody generates requests for PostVirtualMachineNetworkInterfaceAllocateIp with any type of body -func NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/allocate_ip") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequest calls the generic PostVirtualMachineNetworkInterfaceAllocateNewIp builder with application/json body -func NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequest(server string, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody generates requests for PostVirtualMachineNetworkInterfaceAllocateNewIp with any type of body -func NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/allocate_new_ip") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionRequest generates requests for GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion -func NewGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionRequest(server string, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/available_ips/:address_version") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineNetworkInterfaceId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_network_interface[id]", runtime.ParamLocationQuery, *params.VirtualMachineNetworkInterfaceId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "address_version", runtime.ParamLocationQuery, params.AddressVersion); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequest calls the generic PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile builder with application/json body -func NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequest(server string, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody generates requests for PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile with any type of body -func NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/update_speed_profile") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachinePackagesRequest generates requests for GetVirtualMachinePackages -func NewGetVirtualMachinePackagesRequest(server string, params *GetVirtualMachinePackagesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_packages") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.OrganizationId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.OrganizationSubDomain != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetVirtualMachinePackageRequest generates requests for GetVirtualMachinePackage -func NewGetVirtualMachinePackageRequest(server string, params *GetVirtualMachinePackageParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machine_packages/:virtual_machine_package") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachinePackageId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_package[id]", runtime.ParamLocationQuery, *params.VirtualMachinePackageId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.VirtualMachinePackagePermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_package[permalink]", runtime.ParamLocationQuery, *params.VirtualMachinePackagePermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewDeleteVirtualMachineRequest calls the generic DeleteVirtualMachine builder with application/json body -func NewDeleteVirtualMachineRequest(server string, body DeleteVirtualMachineJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewDeleteVirtualMachineRequestWithBody(server, "application/json", bodyReader) -} - -// NewDeleteVirtualMachineRequestWithBody generates requests for DeleteVirtualMachine with any type of body -func NewDeleteVirtualMachineRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("DELETE", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachineRequest generates requests for GetVirtualMachine -func NewGetVirtualMachineRequest(server string, params *GetVirtualMachineParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.VirtualMachineFqdn != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPatchVirtualMachineRequest calls the generic PatchVirtualMachine builder with application/json body -func NewPatchVirtualMachineRequest(server string, body PatchVirtualMachineJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPatchVirtualMachineRequestWithBody(server, "application/json", bodyReader) -} - -// NewPatchVirtualMachineRequestWithBody generates requests for PatchVirtualMachine with any type of body -func NewPatchVirtualMachineRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PATCH", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostVirtualMachineAllocateIpRequest calls the generic PostVirtualMachineAllocateIp builder with application/json body -func NewPostVirtualMachineAllocateIpRequest(server string, body PostVirtualMachineAllocateIpJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineAllocateIpRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineAllocateIpRequestWithBody generates requests for PostVirtualMachineAllocateIp with any type of body -func NewPostVirtualMachineAllocateIpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/allocate_ip") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostVirtualMachineConsoleSessionsRequest calls the generic PostVirtualMachineConsoleSessions builder with application/json body -func NewPostVirtualMachineConsoleSessionsRequest(server string, body PostVirtualMachineConsoleSessionsJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineConsoleSessionsRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineConsoleSessionsRequestWithBody generates requests for PostVirtualMachineConsoleSessions with any type of body -func NewPostVirtualMachineConsoleSessionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/console_sessions") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachineDiskBackupPoliciesRequest generates requests for GetVirtualMachineDiskBackupPolicies -func NewGetVirtualMachineDiskBackupPoliciesRequest(server string, params *GetVirtualMachineDiskBackupPoliciesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/disk_backup_policies") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.VirtualMachineFqdn != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.IncludeDisks != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_disks", runtime.ParamLocationQuery, *params.IncludeDisks); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPostVirtualMachineDiskBackupPoliciesRequest calls the generic PostVirtualMachineDiskBackupPolicies builder with application/json body -func NewPostVirtualMachineDiskBackupPoliciesRequest(server string, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineDiskBackupPoliciesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineDiskBackupPoliciesRequestWithBody generates requests for PostVirtualMachineDiskBackupPolicies with any type of body -func NewPostVirtualMachineDiskBackupPoliciesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/disk_backup_policies") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachineDisksRequest generates requests for GetVirtualMachineDisks -func NewGetVirtualMachineDisksRequest(server string, params *GetVirtualMachineDisksParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/disks") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.VirtualMachineFqdn != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPutVirtualMachineFlexibleResourcesRequest calls the generic PutVirtualMachineFlexibleResources builder with application/json body -func NewPutVirtualMachineFlexibleResourcesRequest(server string, body PutVirtualMachineFlexibleResourcesJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPutVirtualMachineFlexibleResourcesRequestWithBody(server, "application/json", bodyReader) -} - -// NewPutVirtualMachineFlexibleResourcesRequestWithBody generates requests for PutVirtualMachineFlexibleResources with any type of body -func NewPutVirtualMachineFlexibleResourcesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/flexible_resources") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PUT", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachineNetworkInterfacesRequest generates requests for GetVirtualMachineNetworkInterfaces -func NewGetVirtualMachineNetworkInterfacesRequest(server string, params *GetVirtualMachineNetworkInterfacesParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/network_interfaces") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.VirtualMachineFqdn != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.Page != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.PerPage != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetVirtualMachineNetworkInterfaceRequest generates requests for GetVirtualMachineNetworkInterface -func NewGetVirtualMachineNetworkInterfaceRequest(server string, params *GetVirtualMachineNetworkInterfaceParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/networks/:network/interface") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.VirtualMachineFqdn != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[id]", runtime.ParamLocationQuery, *params.NetworkId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.NetworkPermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[permalink]", runtime.ParamLocationQuery, *params.NetworkPermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewPutVirtualMachinePackageRequest calls the generic PutVirtualMachinePackage builder with application/json body -func NewPutVirtualMachinePackageRequest(server string, body PutVirtualMachinePackageJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPutVirtualMachinePackageRequestWithBody(server, "application/json", bodyReader) -} - -// NewPutVirtualMachinePackageRequestWithBody generates requests for PutVirtualMachinePackage with any type of body -func NewPutVirtualMachinePackageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/package") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("PUT", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostVirtualMachineResetRequest calls the generic PostVirtualMachineReset builder with application/json body -func NewPostVirtualMachineResetRequest(server string, body PostVirtualMachineResetJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineResetRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineResetRequestWithBody generates requests for PostVirtualMachineReset with any type of body -func NewPostVirtualMachineResetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/reset") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostVirtualMachineShutdownRequest calls the generic PostVirtualMachineShutdown builder with application/json body -func NewPostVirtualMachineShutdownRequest(server string, body PostVirtualMachineShutdownJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineShutdownRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineShutdownRequestWithBody generates requests for PostVirtualMachineShutdown with any type of body -func NewPostVirtualMachineShutdownRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/shutdown") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostVirtualMachineStartRequest calls the generic PostVirtualMachineStart builder with application/json body -func NewPostVirtualMachineStartRequest(server string, body PostVirtualMachineStartJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineStartRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineStartRequestWithBody generates requests for PostVirtualMachineStart with any type of body -func NewPostVirtualMachineStartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/start") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewPostVirtualMachineStopRequest calls the generic PostVirtualMachineStop builder with application/json body -func NewPostVirtualMachineStopRequest(server string, body PostVirtualMachineStopJSONRequestBody) (*http.Request, error) { - var bodyReader io.Reader - buf, err := json.Marshal(body) - if err != nil { - return nil, err - } - bodyReader = bytes.NewReader(buf) - return NewPostVirtualMachineStopRequestWithBody(server, "application/json", bodyReader) -} - -// NewPostVirtualMachineStopRequestWithBody generates requests for PostVirtualMachineStop with any type of body -func NewPostVirtualMachineStopRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/stop") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("POST", queryURL.String(), body) - if err != nil { - return nil, err - } - - req.Header.Add("Content-Type", contentType) - - return req, nil -} - -// NewGetVirtualMachinesBuildsVirtualMachineBuildRequest generates requests for GetVirtualMachinesBuildsVirtualMachineBuild -func NewGetVirtualMachinesBuildsVirtualMachineBuildRequest(server string, params *GetVirtualMachinesBuildsVirtualMachineBuildParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/virtual_machines/builds/:virtual_machine_build") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.VirtualMachineBuildId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_build[id]", runtime.ParamLocationQuery, *params.VirtualMachineBuildId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetZonesRequest generates requests for GetZones -func NewGetZonesRequest(server string) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/zones") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -// NewGetZoneRequest generates requests for GetZone -func NewGetZoneRequest(server string, params *GetZoneParams) (*http.Request, error) { - var err error - - serverURL, err := url.Parse(server) - if err != nil { - return nil, err - } - - operationPath := fmt.Sprintf("/zones/:zone") - if operationPath[0] == '/' { - operationPath = "." + operationPath - } - - queryURL, err := serverURL.Parse(operationPath) - if err != nil { - return nil, err - } - - if params != nil { - queryValues := queryURL.Query() - - if params.ZoneId != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "zone[id]", runtime.ParamLocationQuery, *params.ZoneId); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - if params.ZonePermalink != nil { - - if queryFrag, err := runtime.StyleParamWithLocation("form", true, "zone[permalink]", runtime.ParamLocationQuery, *params.ZonePermalink); err != nil { - return nil, err - } else if parsed, err := url.ParseQuery(queryFrag); err != nil { - return nil, err - } else { - for k, v := range parsed { - for _, v2 := range v { - queryValues.Add(k, v2) - } - } - } - - } - - queryURL.RawQuery = queryValues.Encode() - } - - req, err := http.NewRequest("GET", queryURL.String(), nil) - if err != nil { - return nil, err - } - - return req, nil -} - -func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { - for _, r := range c.RequestEditors { - if err := r(ctx, req); err != nil { - return err - } - } - for _, r := range additionalEditors { - if err := r(ctx, req); err != nil { - return err - } - } - return nil -} // ClientWithResponses builds on ClientInterface to offer response payloads -type ClientWithResponses struct { - ClientInterface -} - -// NewClientWithResponses creates a new ClientWithResponses, which wraps -// Client with return type handling -func NewClientWithResponses(server string, token string, opts ...ClientOption) (*ClientWithResponses, error) { - client, err := NewClient(server, token, opts...) - if err != nil { - return nil, err - } - return &ClientWithResponses{client}, nil -} - -// WithBaseURL overrides the baseURL. -func WithBaseURL(baseURL string) ClientOption { - return func(c *Client) error { - newBaseURL, err := url.Parse(baseURL) - if err != nil { - return err - } - c.Server = newBaseURL.String() - return nil - } -} - -// ClientWithResponsesInterface is the interface specification for the client with responses above. -type ClientWithResponsesInterface interface { - // GetCertificateWithResponse request - GetCertificateWithResponse(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*GetCertificateResponse, error) - - // GetCountriesWithResponse request - GetCountriesWithResponse(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*GetCountriesResponse, error) - - // GetCountryWithResponse request - GetCountryWithResponse(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*GetCountryResponse, error) - - // GetCountryCountryStatesWithResponse request - GetCountryCountryStatesWithResponse(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*GetCountryCountryStatesResponse, error) - - // GetCountryStateWithResponse request - GetCountryStateWithResponse(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*GetCountryStateResponse, error) - - // GetCurrenciesWithResponse request - GetCurrenciesWithResponse(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*GetCurrenciesResponse, error) - - // GetCurrencyWithResponse request - GetCurrencyWithResponse(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*GetCurrencyResponse, error) - - // GetDataCentersWithResponse request - GetDataCentersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDataCentersResponse, error) - - // GetDataCenterWithResponse request - GetDataCenterWithResponse(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*GetDataCenterResponse, error) - - // GetDataCenterDefaultNetworkWithResponse request - GetDataCenterDefaultNetworkWithResponse(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*GetDataCenterDefaultNetworkResponse, error) - - // GetDataCenterGpuTypesWithResponse request - GetDataCenterGpuTypesWithResponse(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*GetDataCenterGpuTypesResponse, error) - - // DeleteDiskBackupPolicyWithBodyWithResponse request with any body - DeleteDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) - - DeleteDiskBackupPolicyWithResponse(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) - - // GetDiskBackupPolicyWithResponse request - GetDiskBackupPolicyWithResponse(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*GetDiskBackupPolicyResponse, error) - - // PatchDiskBackupPolicyWithBodyWithResponse request with any body - PatchDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) - - PatchDiskBackupPolicyWithResponse(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) - - // DeleteDiskBackupPolicyScheduleWithBodyWithResponse request with any body - DeleteDiskBackupPolicyScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) - - DeleteDiskBackupPolicyScheduleWithResponse(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) - - // GetDiskTemplateVersionWithResponse request - GetDiskTemplateVersionWithResponse(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionResponse, error) - - // GetDiskTemplateVersionSpecWithResponse request - GetDiskTemplateVersionSpecWithResponse(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionSpecResponse, error) - - // GetDiskTemplateWithResponse request - GetDiskTemplateWithResponse(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateResponse, error) - - // GetDiskTemplateVersionsWithResponse request - GetDiskTemplateVersionsWithResponse(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionsResponse, error) - - // GetDiskWithResponse request - GetDiskWithResponse(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*GetDiskResponse, error) - - // GetDiskDiskBackupPoliciesWithResponse request - GetDiskDiskBackupPoliciesWithResponse(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetDiskDiskBackupPoliciesResponse, error) - - // PostDiskDiskBackupPoliciesWithBodyWithResponse request with any body - PostDiskDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) - - PostDiskDiskBackupPoliciesWithResponse(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) - - // DeleteDnsRecordWithBodyWithResponse request with any body - DeleteDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) - - DeleteDnsRecordWithResponse(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) - - // GetDnsRecordWithResponse request - GetDnsRecordWithResponse(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*GetDnsRecordResponse, error) - - // PatchDnsRecordWithBodyWithResponse request with any body - PatchDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) - - PatchDnsRecordWithResponse(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) - - // DeleteDnsZoneWithBodyWithResponse request with any body - DeleteDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) - - DeleteDnsZoneWithResponse(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) - - // GetDnsZoneWithResponse request - GetDnsZoneWithResponse(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*GetDnsZoneResponse, error) - - // PatchDnsZoneWithBodyWithResponse request with any body - PatchDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) - - PatchDnsZoneWithResponse(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) - - // GetDnsZoneRecordsWithResponse request - GetDnsZoneRecordsWithResponse(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*GetDnsZoneRecordsResponse, error) - - // PostDnsZoneRecordsWithBodyWithResponse request with any body - PostDnsZoneRecordsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) - - PostDnsZoneRecordsWithResponse(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) - - // PostDnsZoneVerifyWithBodyWithResponse request with any body - PostDnsZoneVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) - - PostDnsZoneVerifyWithResponse(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) - - // DeleteFileStorageVolumeWithBodyWithResponse request with any body - DeleteFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) - - DeleteFileStorageVolumeWithResponse(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) - - // GetFileStorageVolumeWithResponse request - GetFileStorageVolumeWithResponse(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*GetFileStorageVolumeResponse, error) - - // PatchFileStorageVolumeWithBodyWithResponse request with any body - PatchFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) - - PatchFileStorageVolumeWithResponse(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) - - // GetGpuTypesWithResponse request - GetGpuTypesWithResponse(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*GetGpuTypesResponse, error) - - // GetGpuTypeWithResponse request - GetGpuTypeWithResponse(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*GetGpuTypeResponse, error) - - // PostInvalidateLinkedWebSessionWithBodyWithResponse request with any body - PostInvalidateLinkedWebSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) - - PostInvalidateLinkedWebSessionWithResponse(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) - - // DeleteIpAddressWithBodyWithResponse request with any body - DeleteIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) - - DeleteIpAddressWithResponse(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) - - // GetIpAddressWithResponse request - GetIpAddressWithResponse(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*GetIpAddressResponse, error) - - // PatchIpAddressWithBodyWithResponse request with any body - PatchIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) - - PatchIpAddressWithResponse(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) - - // PostIpAddressUnallocateWithBodyWithResponse request with any body - PostIpAddressUnallocateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) - - PostIpAddressUnallocateWithResponse(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) - - // DeleteLoadBalancerWithBodyWithResponse request with any body - DeleteLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) - - DeleteLoadBalancerWithResponse(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) - - // GetLoadBalancerWithResponse request - GetLoadBalancerWithResponse(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerResponse, error) - - // PatchLoadBalancerWithBodyWithResponse request with any body - PatchLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) - - PatchLoadBalancerWithResponse(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) - - // GetLoadBalancerRulesWithResponse request - GetLoadBalancerRulesWithResponse(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerRulesResponse, error) - - // PostLoadBalancerRulesWithBodyWithResponse request with any body - PostLoadBalancerRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) - - PostLoadBalancerRulesWithResponse(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) - - // DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with any body - DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) - - DeleteLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) - - // GetLoadBalancersRulesLoadBalancerRuleWithResponse request - GetLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*GetLoadBalancersRulesLoadBalancerRuleResponse, error) - - // PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with any body - PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) - - PatchLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) - - // GetNetworkWithResponse request - GetNetworkWithResponse(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*GetNetworkResponse, error) - - // GetOperatingSystemsWithResponse request - GetOperatingSystemsWithResponse(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemsResponse, error) - - // GetOperatingSystemWithResponse request - GetOperatingSystemWithResponse(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemResponse, error) - - // GetOrganizationsWithResponse request - GetOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) - - // GetOrganizationWithResponse request - GetOrganizationWithResponse(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error) - - // GetOrganizationAvailableNetworksWithResponse request - GetOrganizationAvailableNetworksWithResponse(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*GetOrganizationAvailableNetworksResponse, error) - - // GetOrganizationCertificatesWithResponse request - GetOrganizationCertificatesWithResponse(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationCertificatesResponse, error) - - // GetOrganizationDiskBackupPoliciesWithResponse request - GetOrganizationDiskBackupPoliciesWithResponse(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskBackupPoliciesResponse, error) - - // GetOrganizationDiskTemplatesWithResponse request - GetOrganizationDiskTemplatesWithResponse(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskTemplatesResponse, error) - - // GetOrganizationDisksWithResponse request - GetOrganizationDisksWithResponse(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*GetOrganizationDisksResponse, error) - - // GetOrganizationDnsZonesWithResponse request - GetOrganizationDnsZonesWithResponse(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesResponse, error) - - // PostOrganizationDnsZonesWithBodyWithResponse request with any body - PostOrganizationDnsZonesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) - - PostOrganizationDnsZonesWithResponse(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) - - // GetOrganizationDnsZonesNameserversWithResponse request - GetOrganizationDnsZonesNameserversWithResponse(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesNameserversResponse, error) - - // GetOrganizationFileStorageVolumesWithResponse request - GetOrganizationFileStorageVolumesWithResponse(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*GetOrganizationFileStorageVolumesResponse, error) - - // PostOrganizationFileStorageVolumesWithBodyWithResponse request with any body - PostOrganizationFileStorageVolumesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) - - PostOrganizationFileStorageVolumesWithResponse(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) - - // GetOrganizationIpAddressesWithResponse request - GetOrganizationIpAddressesWithResponse(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*GetOrganizationIpAddressesResponse, error) - - // PostOrganizationIpAddressesWithBodyWithResponse request with any body - PostOrganizationIpAddressesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) - - PostOrganizationIpAddressesWithResponse(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) - - // GetOrganizationLoadBalancersWithResponse request - GetOrganizationLoadBalancersWithResponse(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*GetOrganizationLoadBalancersResponse, error) - - // PostOrganizationLoadBalancersWithBodyWithResponse request with any body - PostOrganizationLoadBalancersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) - - PostOrganizationLoadBalancersWithResponse(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) - - // GetOrganizationManagedWithResponse request - GetOrganizationManagedWithResponse(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*GetOrganizationManagedResponse, error) - - // PostOrganizationManagedWithBodyWithResponse request with any body - PostOrganizationManagedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) - - PostOrganizationManagedWithResponse(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) - - // GetOrganizationNetworkSpeedProfilesWithResponse request - GetOrganizationNetworkSpeedProfilesWithResponse(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*GetOrganizationNetworkSpeedProfilesResponse, error) - - // GetOrganizationSecurityGroupsWithResponse request - GetOrganizationSecurityGroupsWithResponse(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationSecurityGroupsResponse, error) - - // PostOrganizationSecurityGroupsWithBodyWithResponse request with any body - PostOrganizationSecurityGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) - - PostOrganizationSecurityGroupsWithResponse(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) - - // GetOrganizationSshKeysWithResponse request - GetOrganizationSshKeysWithResponse(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*GetOrganizationSshKeysResponse, error) - - // PostOrganizationSshKeysWithBodyWithResponse request with any body - PostOrganizationSshKeysWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) - - PostOrganizationSshKeysWithResponse(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) - - // GetOrganizationTagsWithResponse request - GetOrganizationTagsWithResponse(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTagsResponse, error) - - // PostOrganizationTagsWithBodyWithResponse request with any body - PostOrganizationTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) - - PostOrganizationTagsWithResponse(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) - - // GetOrganizationTrashObjectsWithResponse request - GetOrganizationTrashObjectsWithResponse(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTrashObjectsResponse, error) - - // PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse request with any body - PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) - - PostOrganizationTrashObjectsPurgeAllWithResponse(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) - - // GetOrganizationUsersWithAccessWithResponse request - GetOrganizationUsersWithAccessWithResponse(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*GetOrganizationUsersWithAccessResponse, error) - - // GetOrganizationVirtualMachineGroupsWithResponse request - GetOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachineGroupsResponse, error) - - // PostOrganizationVirtualMachineGroupsWithBodyWithResponse request with any body - PostOrganizationVirtualMachineGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) - - PostOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) - - // GetOrganizationVirtualMachinesWithResponse request - GetOrganizationVirtualMachinesWithResponse(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachinesResponse, error) - - // PostOrganizationVirtualMachinesBuildWithBodyWithResponse request with any body - PostOrganizationVirtualMachinesBuildWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) - - PostOrganizationVirtualMachinesBuildWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) - - // PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse request with any body - PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) - - PostOrganizationVirtualMachinesBuildFromSpecWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) - - // DeleteSecurityGroupWithBodyWithResponse request with any body - DeleteSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) - - DeleteSecurityGroupWithResponse(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) - - // GetSecurityGroupWithResponse request - GetSecurityGroupWithResponse(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupResponse, error) - - // PatchSecurityGroupWithBodyWithResponse request with any body - PatchSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) - - PatchSecurityGroupWithResponse(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) - - // GetSecurityGroupRulesWithResponse request - GetSecurityGroupRulesWithResponse(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupRulesResponse, error) - - // PostSecurityGroupRulesWithBodyWithResponse request with any body - PostSecurityGroupRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) - - PostSecurityGroupRulesWithResponse(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) - - // DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with any body - DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) - - DeleteSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) - - // GetSecurityGroupsRulesSecurityGroupRuleWithResponse request - GetSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupsRulesSecurityGroupRuleResponse, error) - - // PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with any body - PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) - - PatchSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) - - // DeleteSshKeyWithBodyWithResponse request with any body - DeleteSshKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) - - DeleteSshKeyWithResponse(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) - - // DeleteTagWithBodyWithResponse request with any body - DeleteTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) - - DeleteTagWithResponse(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) - - // GetTagWithResponse request - GetTagWithResponse(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*GetTagResponse, error) - - // PatchTagWithBodyWithResponse request with any body - PatchTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) - - PatchTagWithResponse(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) - - // GetTaskWithResponse request - GetTaskWithResponse(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) - - // DeleteTrashObjectWithBodyWithResponse request with any body - DeleteTrashObjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) - - DeleteTrashObjectWithResponse(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) - - // GetTrashObjectWithResponse request - GetTrashObjectWithResponse(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*GetTrashObjectResponse, error) - - // PostTrashObjectRestoreWithBodyWithResponse request with any body - PostTrashObjectRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) - - PostTrashObjectRestoreWithResponse(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) - - // GetUsersCurrentWithResponse request - GetUsersCurrentWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsersCurrentResponse, error) - - // DeleteVirtualMachineGroupWithBodyWithResponse request with any body - DeleteVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) - - DeleteVirtualMachineGroupWithResponse(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) - - // GetVirtualMachineGroupWithResponse request - GetVirtualMachineGroupWithResponse(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineGroupResponse, error) - - // PatchVirtualMachineGroupWithBodyWithResponse request with any body - PatchVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) - - PatchVirtualMachineGroupWithResponse(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) - - // GetVMNIVMNIWithResponse request - GetVMNIVMNIWithResponse(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*GetVMNIVMNIResponse, error) - - // PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse request with any body - PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) - - PostVirtualMachineNetworkInterfaceAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) - - // PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse request with any body - PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) - - PostVirtualMachineNetworkInterfaceAllocateNewIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) - - // GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse request - GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse, error) - - // PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse request with any body - PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) - - PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithResponse(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) - - // GetVirtualMachinePackagesWithResponse request - GetVirtualMachinePackagesWithResponse(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackagesResponse, error) - - // GetVirtualMachinePackageWithResponse request - GetVirtualMachinePackageWithResponse(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackageResponse, error) - - // DeleteVirtualMachineWithBodyWithResponse request with any body - DeleteVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) - - DeleteVirtualMachineWithResponse(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) - - // GetVirtualMachineWithResponse request - GetVirtualMachineWithResponse(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineResponse, error) - - // PatchVirtualMachineWithBodyWithResponse request with any body - PatchVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) - - PatchVirtualMachineWithResponse(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) - - // PostVirtualMachineAllocateIpWithBodyWithResponse request with any body - PostVirtualMachineAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) - - PostVirtualMachineAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) - - // PostVirtualMachineConsoleSessionsWithBodyWithResponse request with any body - PostVirtualMachineConsoleSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) - - PostVirtualMachineConsoleSessionsWithResponse(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) - - // GetVirtualMachineDiskBackupPoliciesWithResponse request - GetVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDiskBackupPoliciesResponse, error) - - // PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse request with any body - PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) - - PostVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) - - // GetVirtualMachineDisksWithResponse request - GetVirtualMachineDisksWithResponse(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDisksResponse, error) - - // PutVirtualMachineFlexibleResourcesWithBodyWithResponse request with any body - PutVirtualMachineFlexibleResourcesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) - - PutVirtualMachineFlexibleResourcesWithResponse(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) - - // GetVirtualMachineNetworkInterfacesWithResponse request - GetVirtualMachineNetworkInterfacesWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfacesResponse, error) - - // GetVirtualMachineNetworkInterfaceWithResponse request - GetVirtualMachineNetworkInterfaceWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceResponse, error) - - // PutVirtualMachinePackageWithBodyWithResponse request with any body - PutVirtualMachinePackageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) - - PutVirtualMachinePackageWithResponse(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) - - // PostVirtualMachineResetWithBodyWithResponse request with any body - PostVirtualMachineResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) - - PostVirtualMachineResetWithResponse(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) - - // PostVirtualMachineShutdownWithBodyWithResponse request with any body - PostVirtualMachineShutdownWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) - - PostVirtualMachineShutdownWithResponse(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) - - // PostVirtualMachineStartWithBodyWithResponse request with any body - PostVirtualMachineStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) - - PostVirtualMachineStartWithResponse(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) - - // PostVirtualMachineStopWithBodyWithResponse request with any body - PostVirtualMachineStopWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) - - PostVirtualMachineStopWithResponse(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) - - // GetVirtualMachinesBuildsVirtualMachineBuildWithResponse request - GetVirtualMachinesBuildsVirtualMachineBuildWithResponse(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinesBuildsVirtualMachineBuildResponse, error) - - // GetZonesWithResponse request - GetZonesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetZonesResponse, error) - - // GetZoneWithResponse request - GetZoneWithResponse(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*GetZoneResponse, error) -} - -type GetCertificateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Certificate []Certificate `json:"certificate"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *CertificateNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetCertificateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCertificateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCountriesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Countries The list of countries - Countries []GetCountries200ResponseCountries `json:"countries"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetCountriesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCountriesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCountryResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Country The country details - Country Country `json:"country"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *CountryNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetCountryResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCountryResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCountryCountryStatesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // CountryStates The list of country states for the given country - CountryStates []GetCountryCountryStates200ResponseCountryStates `json:"country_states"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *CountryNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetCountryCountryStatesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCountryCountryStatesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCountryStateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // CountryState The country state details - CountryState CountryState `json:"country_state"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *CountryStateNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetCountryStateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCountryStateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCurrenciesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Currencies The list of currencies - Currencies []GetCurrencies200ResponseCurrencies `json:"currencies"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetCurrenciesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrenciesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetCurrencyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Currency The currency details - Currency Currency `json:"currency"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *CurrencyNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetCurrencyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetCurrencyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDataCentersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - DataCenters []GetDataCenters200ResponseDataCenters `json:"data_centers"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDataCentersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDataCentersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDataCenterResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - DataCenter GetDataCenter200ResponseDataCenter `json:"data_center"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DataCenterNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDataCenterResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDataCenterResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDataCenterDefaultNetworkResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Network The details for the requested network - Network GetDataCenterDefaultNetwork200ResponseNetwork `json:"network"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DataCenterNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDataCenterDefaultNetworkResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDataCenterDefaultNetworkResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDataCenterGpuTypesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - GpuTypes []GetDataCenterGPUTypes200ResponseGPUTypes `json:"gpu_types"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DataCenterNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDataCenterGpuTypesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDataCenterGpuTypesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteDiskBackupPolicyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicy The disk backup policy that has been destroyed - DiskBackupPolicy DeleteDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *DiskBackupPolicyNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteDiskBackupPolicyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteDiskBackupPolicyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDiskBackupPolicyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicy The located disk backup policy - DiskBackupPolicy GetDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DiskBackupPolicyNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDiskBackupPolicyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDiskBackupPolicyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchDiskBackupPolicyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicy The disk backup policy that has been updated - DiskBackupPolicy PatchDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *DiskBackupPolicyNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchDiskBackupPolicyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchDiskBackupPolicyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteDiskBackupPolicyScheduleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicy The disk backup policy that has been scheduled for deletion - DiskBackupPolicy DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - JSON400 *InvalidTimestamp400Res - JSON403 *PermissionDenied403Res - JSON404 *DiskBackupPolicyNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteDiskBackupPolicyScheduleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteDiskBackupPolicyScheduleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDiskTemplateVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskTemplateVersion The disk template version details - DiskTemplateVersion GetDiskTemplateVersion200ResponseDiskTemplateVersion `json:"disk_template_version"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DiskTemplateVersionNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDiskTemplateVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDiskTemplateVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDiskTemplateVersionSpecResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskTemplateVersion The disk template version details - DiskTemplateVersion GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion `json:"disk_template_version"` - Spec TemplateSpec `json:"spec"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DiskTemplateVersionNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDiskTemplateVersionSpecResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDiskTemplateVersionSpecResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDiskTemplateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskTemplate The disk template details - DiskTemplate GetDiskTemplate200ResponseDiskTemplate `json:"disk_template"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DiskTemplateNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDiskTemplateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDiskTemplateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDiskTemplateVersionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - DiskTemplate GetDiskTemplateVersions200ResponseDiskTemplate `json:"disk_template"` - - // DiskTemplateVersions The disk template versions for the provided template - DiskTemplateVersions []GetDiskTemplateVersions200ResponseDiskTemplateVersions `json:"disk_template_versions"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DiskTemplateNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDiskTemplateVersionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDiskTemplateVersionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDiskResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Disk The disk details - Disk GetDisk200ResponseDisk `json:"disk"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DiskNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDiskResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDiskResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDiskDiskBackupPoliciesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicies The disk backup policies for the provided disk - DiskBackupPolicies []GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *DiskNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDiskDiskBackupPoliciesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDiskDiskBackupPoliciesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostDiskDiskBackupPoliciesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicy The new disk backup policy that has been created - DiskBackupPolicy PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *DiskNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostDiskDiskBackupPoliciesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostDiskDiskBackupPoliciesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteDnsRecordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Deleted bool `json:"deleted"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DNSRecordNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteDnsRecordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteDnsRecordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDnsRecordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DnsRecord The DNS record for the provided organization - DnsRecord DNSRecord `json:"dns_record"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DNSRecordNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDnsRecordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDnsRecordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchDnsRecordResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DnsRecord The DNS record that has been updated - DnsRecord DNSRecord `json:"dns_record"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DNSRecordNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchDnsRecordResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchDnsRecordResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteDnsZoneResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Deleted bool `json:"deleted"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DNSZoneNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteDnsZoneResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteDnsZoneResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDnsZoneResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DnsZone The DNS zones for the provided organization - DnsZone DNSZone `json:"dns_zone"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DNSZoneNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDnsZoneResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDnsZoneResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchDnsZoneResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DnsZone The DNS zones for the provided organization - DnsZone DNSZone `json:"dns_zone"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DNSZoneNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchDnsZoneResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchDnsZoneResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetDnsZoneRecordsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DnsRecords The DNS record for the provided zone - DnsRecords []DNSRecord `json:"dns_records"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *DNSZoneNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetDnsZoneRecordsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetDnsZoneRecordsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostDnsZoneRecordsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - DnsRecord DNSRecord `json:"dns_record"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *DNSZoneNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostDnsZoneRecordsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostDnsZoneRecordsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostDnsZoneVerifyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DnsZone The DNS zones for the provided organization - DnsZone DNSZone `json:"dns_zone"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *DNSZoneNotFoundResponse - JSON422 *DNSZoneNotVerifiedResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostDnsZoneVerifyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostDnsZoneVerifyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteFileStorageVolumeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // FileStorageVolume The file storage volume that has been destroyed. - FileStorageVolume DeleteFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` - TrashObject TrashObject `json:"trash_object"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *FileStorageVolumeNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteFileStorageVolumeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteFileStorageVolumeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetFileStorageVolumeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // FileStorageVolume The file storage volume. - FileStorageVolume GetFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *FileStorageVolumeNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetFileStorageVolumeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetFileStorageVolumeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchFileStorageVolumeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // FileStorageVolume The file storage volume. - FileStorageVolume PatchFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *FileStorageVolumeNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchFileStorageVolumeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchFileStorageVolumeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetGpuTypesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - GpuTypes []GetGPUTypes200ResponseGPUTypes `json:"gpu_types"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetGpuTypesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetGpuTypesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetGpuTypeResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - GpuType GetGPUType200ResponseGPUType `json:"gpu_type"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *GPUTypeNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetGpuTypeResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetGpuTypeResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostInvalidateLinkedWebSessionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Status bool `json:"status"` - } - JSON400 *IdentityNotLinkedToWebSession400Res - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostInvalidateLinkedWebSessionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostInvalidateLinkedWebSessionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteIpAddressResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *interface{} - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *IPAddressNotFoundResponse - JSON409 *ResourceDoesNotSupportUnallocationResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteIpAddressResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteIpAddressResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetIpAddressResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Allocation The resource this address is allocated to - Allocation *GetIPAddress200ResponseAllocation `json:"allocation"` - - // IpAddress The IP address that has been located - IpAddress IPAddress `json:"ip_address"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *IPAddressNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetIpAddressResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetIpAddressResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchIpAddressResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // IpAddress The IP address that has been updated - IpAddress IPAddress `json:"ip_address"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *IPAddressNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchIpAddressResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchIpAddressResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostIpAddressUnallocateResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *interface{} - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *IPAddressNotFoundResponse - JSON409 *ResourceDoesNotSupportUnallocationResponse - JSON422 *NoAllocationResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostIpAddressUnallocateResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostIpAddressUnallocateResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteLoadBalancerResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancer The load balancer that has been destroyed - LoadBalancer DeleteLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *LoadBalancerNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteLoadBalancerResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteLoadBalancerResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetLoadBalancerResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancer The load balancer - LoadBalancer GetLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *LoadBalancerNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetLoadBalancerResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetLoadBalancerResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchLoadBalancerResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancer The load balancer that has been updated - LoadBalancer PatchLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *LoadBalancerNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchLoadBalancerResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchLoadBalancerResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetLoadBalancerRulesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancerRules The load balancer rules for this load balancer - LoadBalancerRules []GetLoadBalancerRules200ResponseLoadBalancerRules `json:"load_balancer_rules"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *LoadBalancerNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetLoadBalancerRulesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetLoadBalancerRulesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostLoadBalancerRulesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancerRule The load balancer rule that has been created - LoadBalancerRule PostLoadBalancerRules200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *LoadBalancerNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostLoadBalancerRulesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostLoadBalancerRulesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteLoadBalancersRulesLoadBalancerRuleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancerRule The load balancer rule that has been destroyed - LoadBalancerRule DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *LoadBalancerRuleNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteLoadBalancersRulesLoadBalancerRuleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteLoadBalancersRulesLoadBalancerRuleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetLoadBalancersRulesLoadBalancerRuleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancerRule The resolved load balancer rule - LoadBalancerRule GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *LoadBalancerRuleNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetLoadBalancersRulesLoadBalancerRuleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetLoadBalancersRulesLoadBalancerRuleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchLoadBalancersRulesLoadBalancerRuleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancerRule The load balancer that has been updated - LoadBalancerRule PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *LoadBalancerRuleNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchLoadBalancersRulesLoadBalancerRuleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchLoadBalancersRulesLoadBalancerRuleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetNetworkResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Network The details for the requested network - Network Network `json:"network"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *NetworkNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetNetworkResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetNetworkResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOperatingSystemsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // OperatingSystems The list of available operating systems - OperatingSystems []GetOperatingSystems200ResponseOperatingSystems `json:"operating_systems"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOperatingSystemsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOperatingSystemsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOperatingSystemResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // OperatingSystem The operating system details - OperatingSystem OperatingSystem `json:"operating_system"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *OperatingSystemNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOperatingSystemResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOperatingSystemResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Organizations []GetOrganizations200ResponseOrganizations `json:"organizations"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Organization Organization `json:"organization"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationAvailableNetworksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Networks []GetOrganizationAvailableNetworks200ResponseNetworks `json:"networks"` - VirtualNetworks []GetOrganizationAvailableNetworks200ResponseVirtualNetworks `json:"virtual_networks"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationAvailableNetworksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationAvailableNetworksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationCertificatesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Certificates []GetOrganizationCertificates200ResponseCertificates `json:"certificates"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationCertificatesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationCertificatesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationDiskBackupPoliciesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicies The disk backup policies for the provided organization - DiskBackupPolicies []GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationDiskBackupPoliciesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationDiskBackupPoliciesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationDiskTemplatesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskTemplates The list of disk templates - DiskTemplates []GetOrganizationDiskTemplates200ResponseDiskTemplates `json:"disk_templates"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OperatingSystemNotFoundOrganizationNotFound404Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationDiskTemplatesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationDiskTemplatesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationDisksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Disk The list of disks - Disk []GetOrganizationDisks200ResponseDisk `json:"disk"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationDisksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationDisksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationDnsZonesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DnsZones The DNS zones for the provided organization - DnsZones []DNSZone `json:"dns_zones"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationDnsZonesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationDnsZonesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationDnsZonesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - // DnsZone The new DNS zone that has been created - DnsZone DNSZone `json:"dns_zone"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationDnsZonesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationDnsZonesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationDnsZonesNameserversResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Nameservers []string `json:"nameservers"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationDnsZonesNameserversResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationDnsZonesNameserversResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationFileStorageVolumesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // FileStorageVolumes A list of all file storage volumes for the given organization. - FileStorageVolumes []GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes `json:"file_storage_volumes"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationFileStorageVolumesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationFileStorageVolumesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationFileStorageVolumesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - // FileStorageVolume The file storage volume. - FileStorageVolume PostOrganizationFileStorageVolumes201ResponseFileStorageVolume `json:"file_storage_volume"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationFileStorageVolumesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationFileStorageVolumesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationIpAddressesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // IpAddresses The IP addresses belonging to this organization - IpAddresses []GetOrganizationIPAddresses200ResponseIPAddresses `json:"ip_addresses"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationIpAddressesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationIpAddressesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationIpAddressesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // IpAddress The newly allocated IP address - IpAddress IPAddress `json:"ip_address"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *NetworkNotFoundOrganizationNotFound404Res - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response - JSON503 *NoAvailableAddressesResponse -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationIpAddressesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationIpAddressesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationLoadBalancersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancers The load balancers owned by this organization - LoadBalancers []GetOrganizationLoadBalancers200ResponseLoadBalancers `json:"load_balancers"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationLoadBalancersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationLoadBalancersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationLoadBalancersResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // LoadBalancer The load balancer that has been created - LoadBalancer PostOrganizationLoadBalancers200ResponseLoadBalancer `json:"load_balancer"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationLoadBalancersResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationLoadBalancersResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationManagedResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Organizations []GetOrganizationManaged200ResponseOrganizations `json:"organizations"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationManagedResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationManagedResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationManagedResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - Organization Organization `json:"organization"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *OrganizationLimitReachedValidationError422Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationManagedResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationManagedResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationNetworkSpeedProfilesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // NetworkSpeedProfiles The network speed profiles available to this organization - NetworkSpeedProfiles []NetworkSpeedProfile `json:"network_speed_profiles"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationNetworkSpeedProfilesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationNetworkSpeedProfilesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationSecurityGroupsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - - // SecurityGroups The security groups owned by this organization - SecurityGroups []SecurityGroup `json:"security_groups"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationSecurityGroupsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationSecurityGroupsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationSecurityGroupsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroup The security group that has been created - SecurityGroup SecurityGroup `json:"security_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationSecurityGroupsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationSecurityGroupsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationSshKeysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - SshKeys []AuthSSHKey `json:"ssh_keys"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationSshKeysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationSshKeysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationSshKeysResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - SshKey AuthSSHKey `json:"ssh_key"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationSshKeysResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationSshKeysResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationTagsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - - // Tags The details for the tags on the organization - Tags []GetOrganizationTags200ResponseTags `json:"tags"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationTagsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationTagsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationTagsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Tag The newly created tag - Tag Tag `json:"tag"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationTagsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationTagsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationTrashObjectsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - - // TrashObjects The trash objects that belong to this organization - TrashObjects []TrashObject `json:"trash_objects"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationTrashObjectsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationTrashObjectsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationTrashObjectsPurgeAllResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task Task `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON406 *TaskQueueingErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationTrashObjectsPurgeAllResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationTrashObjectsPurgeAllResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationUsersWithAccessResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - Users []GetOrganizationUsersWithAccess200ResponseUsers `json:"users"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationUsersWithAccessResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationUsersWithAccessResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationVirtualMachineGroupsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineGroups The virtual machine groups for the provided organization - VirtualMachineGroups []VirtualMachineGroup `json:"virtual_machine_groups"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationVirtualMachineGroupsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationVirtualMachineGroupsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationVirtualMachineGroupsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineGroup The new virtual machine group details - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationVirtualMachineGroupsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationVirtualMachineGroupsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetOrganizationVirtualMachinesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - VirtualMachines []GetOrganizationVirtualMachines200ResponseVirtualMachines `json:"virtual_machines"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetOrganizationVirtualMachinesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetOrganizationVirtualMachinesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationVirtualMachinesBuildResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - // Build Deprecated, please use "virtual_machine_build" instead - Build PostOrganizationVirtualMachinesBuild201ResponseBuild `json:"build"` - Hostname string `json:"hostname"` - Task PostOrganizationVirtualMachinesBuild201ResponseTask `json:"task"` - VirtualMachineBuild PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild `json:"virtual_machine_build"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - JSON404 *DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res - JSON422 *LocationRequiredValidationError422Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationVirtualMachinesBuildResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationVirtualMachinesBuildResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostOrganizationVirtualMachinesBuildFromSpecResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - // Build Deprecated, please use "virtual_machine_build" instead - Build PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild `json:"build"` - Hostname string `json:"hostname"` - Task PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask `json:"task"` - VirtualMachineBuild PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild `json:"virtual_machine_build"` - } - JSON400 *InvalidSpecXML400Res - JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - JSON404 *OrganizationNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostOrganizationVirtualMachinesBuildFromSpecResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostOrganizationVirtualMachinesBuildFromSpecResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSecurityGroupResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroup The security group that has been destroyed - SecurityGroup DeleteSecurityGroup200ResponseSecurityGroup `json:"security_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SecurityGroupNotFoundResponse - JSON409 *DeletionRestrictedResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteSecurityGroupResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSecurityGroupResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSecurityGroupResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroup The security group - SecurityGroup SecurityGroup `json:"security_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *SecurityGroupNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetSecurityGroupResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSecurityGroupResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchSecurityGroupResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroup The security group that has been updated - SecurityGroup SecurityGroup `json:"security_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SecurityGroupNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchSecurityGroupResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchSecurityGroupResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSecurityGroupRulesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - - // SecurityGroupRules The security group rules for this security group - SecurityGroupRules []GetSecurityGroupRules200ResponseSecurityGroupRules `json:"security_group_rules"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SecurityGroupNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetSecurityGroupRulesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSecurityGroupRulesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostSecurityGroupRulesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroupRule The security group rule that has been created - SecurityGroupRule PostSecurityGroupRules200ResponseSecurityGroupRule `json:"security_group_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SecurityGroupNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostSecurityGroupRulesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostSecurityGroupRulesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSecurityGroupsRulesSecurityGroupRuleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroupRule The security group rule that has been destroyed - SecurityGroupRule DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SecurityGroupRuleNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteSecurityGroupsRulesSecurityGroupRuleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSecurityGroupsRulesSecurityGroupRuleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetSecurityGroupsRulesSecurityGroupRuleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroupRule The resolved security group rule - SecurityGroupRule GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SecurityGroupRuleNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetSecurityGroupsRulesSecurityGroupRuleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetSecurityGroupsRulesSecurityGroupRuleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchSecurityGroupsRulesSecurityGroupRuleResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // SecurityGroupRule The security group that has been updated - SecurityGroupRule PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SecurityGroupRuleNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchSecurityGroupsRulesSecurityGroupRuleResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchSecurityGroupsRulesSecurityGroupRuleResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteSshKeyResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - SshKey AuthSSHKey `json:"ssh_key"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *SSHKeyNotFoundResponse - JSON409 *DeletionRestrictedResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteSshKeyResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteSshKeyResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteTagResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Tag The newly deleted tag - Tag Tag `json:"tag"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *TagNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteTagResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTagResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTagResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Tag The details for the requested tag - Tag Tag `json:"tag"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *TagNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetTagResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTagResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchTagResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Tag The newly updated tag - Tag Tag `json:"tag"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *TagNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchTagResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchTagResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTaskResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task Task `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *TaskNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetTaskResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTaskResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteTrashObjectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task Task `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *TrashObjectNotFoundResponse - JSON406 *TaskQueueingErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteTrashObjectResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteTrashObjectResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetTrashObjectResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // TrashObject The requested trash object - TrashObject TrashObject `json:"trash_object"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *TrashObjectNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetTrashObjectResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetTrashObjectResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostTrashObjectRestoreResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // TrashObject The requested trash object - TrashObject TrashObject `json:"trash_object"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *TrashObjectNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostTrashObjectRestoreResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostTrashObjectRestoreResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetUsersCurrentResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - ApiTokenId string `json:"api_token_id"` - Organizations []GetUsersCurrent200ResponseOrganizations `json:"organizations"` - User User `json:"user"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *NoUserAssociatedWithIdentityResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetUsersCurrentResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetUsersCurrentResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteVirtualMachineGroupResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineGroup The details for the deleted virtual machine group - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineGroupNotFoundResponse - JSON409 *DeletionRestrictedResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteVirtualMachineGroupResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteVirtualMachineGroupResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachineGroupResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineGroup The virtual machine group details - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineGroupNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachineGroupResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachineGroupResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchVirtualMachineGroupResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineGroup The updated virtual machine group details - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineGroupNotFoundResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchVirtualMachineGroupResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchVirtualMachineGroupResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVMNIVMNIResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineNetworkInterface The network interface details - VirtualMachineNetworkInterface GetVMNIVMNI200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachineNetworkInterfaceNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVMNIVMNIResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVMNIVMNIResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineNetworkInterfaceAllocateIpResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineNetworkInterface The network interface details - VirtualMachineNetworkInterface PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res - JSON422 *IPAlreadyAllocatedInvalidIP422Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineNetworkInterfaceAllocateIpResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineNetworkInterfaceAllocateIpResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineNetworkInterfaceAllocateNewIpResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // IpAddress The newly allocated IP address - IpAddress IPAddress `json:"ip_address"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNetworkInterfaceNotFoundResponse - JSON429 *APIAuthenticator429Response - JSON503 *NoAvailableAddressesResponse -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineNetworkInterfaceAllocateNewIpResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineNetworkInterfaceAllocateNewIpResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // IpAddresses The IP addresses available for this network interface - IpAddresses []IPAddress `json:"ip_addresses"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachineNetworkInterfaceNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Task The task responsible for updating the virtual machine network interface speed profile - Task Task `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res - JSON406 *TaskQueueingErrorResponse - JSON422 *SpeedProfileAlreadyAssignedResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachinePackagesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - VirtualMachinePackages []GetVirtualMachinePackages200ResponseVirtualMachinePackages `json:"virtual_machine_packages"` - } - JSON400 *APIAuthenticator400Response - JSON403 *OrganizationNotActivatedOrganizationSuspended403Res - JSON404 *OrganizationNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachinePackagesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachinePackagesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachinePackageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - VirtualMachinePackage VirtualMachinePackage `json:"virtual_machine_package"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachinePackageNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachinePackageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachinePackageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type DeleteVirtualMachineResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - TrashObject TrashObject `json:"trash_object"` - VirtualMachine DeleteVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r DeleteVirtualMachineResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r DeleteVirtualMachineResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachineResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - VirtualMachine GetVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachineResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachineResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PatchVirtualMachineResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachine The newly updated virtual machine - VirtualMachine PatchVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PatchVirtualMachineResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PatchVirtualMachineResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineAllocateIpResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // IpAddress The newly allocated IP address - IpAddress IPAddress `json:"ip_address"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *IPAddressNotFoundVirtualMachineNotFound404Res - JSON406 *ObjectInTrashResponse - JSON422 *IPAlreadyAllocatedNoInterfaceAvailable422Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineAllocateIpResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineAllocateIpResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineConsoleSessionsResponse struct { - Body []byte - HTTPResponse *http.Response - JSON201 *struct { - ConsoleSession PostVirtualMachineConsoleSessions201ResponseConsoleSession `json:"console_session"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashVirtualMachineMustBeStarted406Res - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineConsoleSessionsResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineConsoleSessionsResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachineDiskBackupPoliciesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicies The disk backup policies for the provided virtual machine - DiskBackupPolicies []GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachineDiskBackupPoliciesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachineDiskBackupPoliciesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineDiskBackupPoliciesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // DiskBackupPolicy The new disk backup policy that has been created - DiskBackupPolicy PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON422 *ValidationErrorResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineDiskBackupPoliciesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineDiskBackupPoliciesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachineDisksResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Disks The list of disks - Disks []GetVirtualMachineDisks200ResponseDisks `json:"disks"` - Pagination PaginationObject `json:"pagination"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachineDisksResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachineDisksResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PutVirtualMachineFlexibleResourcesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task Task `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashTaskQueueingError406Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PutVirtualMachineFlexibleResourcesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PutVirtualMachineFlexibleResourcesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachineNetworkInterfacesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Pagination PaginationObject `json:"pagination"` - - // VirtualMachineNetworkInterfaces The network interfaces for this virtual machine - VirtualMachineNetworkInterfaces []GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces `json:"virtual_machine_network_interfaces"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachineNetworkInterfacesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachineNetworkInterfacesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachineNetworkInterfaceResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // VirtualMachineNetworkInterface The network interface details - VirtualMachineNetworkInterface GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res - JSON406 *ObjectInTrashResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachineNetworkInterfaceResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachineNetworkInterfaceResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PutVirtualMachinePackageResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task Task `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundVirtualMachinePackageNotFound404Res - JSON406 *ObjectInTrashTaskQueueingError406Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PutVirtualMachinePackageResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PutVirtualMachinePackageResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineResetResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task PostVirtualMachineReset200ResponseTask `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashTaskQueueingError406Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineResetResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineResetResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineShutdownResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task PostVirtualMachineShutdown200ResponseTask `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashTaskQueueingError406Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineShutdownResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineShutdownResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineStartResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task PostVirtualMachineStart200ResponseTask `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashTaskQueueingError406Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineStartResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineStartResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type PostVirtualMachineStopResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - Task PostVirtualMachineStop200ResponseTask `json:"task"` - } - JSON400 *APIAuthenticator400Response - JSON403 *PermissionDenied403Res - JSON404 *VirtualMachineNotFoundResponse - JSON406 *ObjectInTrashTaskQueueingError406Res - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r PostVirtualMachineStopResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r PostVirtualMachineStopResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetVirtualMachinesBuildsVirtualMachineBuildResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - VirtualMachineBuild GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild `json:"virtual_machine_build"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *VirtualMachineBuildNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetVirtualMachinesBuildsVirtualMachineBuildResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetVirtualMachinesBuildsVirtualMachineBuildResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetZonesResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Zones The zones available to the current identity - Zones []GetZones200ResponseZones `json:"zones"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetZonesResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetZonesResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -type GetZoneResponse struct { - Body []byte - HTTPResponse *http.Response - JSON200 *struct { - // Zone The zone details - Zone Zone `json:"zone"` - } - JSON400 *APIAuthenticator400Response - JSON403 *APIAuthenticator403Response - JSON404 *ZoneNotFoundResponse - JSON429 *APIAuthenticator429Response -} - -// Status returns HTTPResponse.Status -func (r GetZoneResponse) Status() string { - if r.HTTPResponse != nil { - return r.HTTPResponse.Status - } - return http.StatusText(0) -} - -// StatusCode returns HTTPResponse.StatusCode -func (r GetZoneResponse) StatusCode() int { - if r.HTTPResponse != nil { - return r.HTTPResponse.StatusCode - } - return 0 -} - -// GetCertificateWithResponse request returning *GetCertificateResponse -func (c *ClientWithResponses) GetCertificateWithResponse(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*GetCertificateResponse, error) { - rsp, err := c.GetCertificate(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCertificateResponse(rsp) -} - -// GetCountriesWithResponse request returning *GetCountriesResponse -func (c *ClientWithResponses) GetCountriesWithResponse(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*GetCountriesResponse, error) { - rsp, err := c.GetCountries(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCountriesResponse(rsp) -} - -// GetCountryWithResponse request returning *GetCountryResponse -func (c *ClientWithResponses) GetCountryWithResponse(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*GetCountryResponse, error) { - rsp, err := c.GetCountry(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCountryResponse(rsp) -} - -// GetCountryCountryStatesWithResponse request returning *GetCountryCountryStatesResponse -func (c *ClientWithResponses) GetCountryCountryStatesWithResponse(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*GetCountryCountryStatesResponse, error) { - rsp, err := c.GetCountryCountryStates(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCountryCountryStatesResponse(rsp) -} - -// GetCountryStateWithResponse request returning *GetCountryStateResponse -func (c *ClientWithResponses) GetCountryStateWithResponse(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*GetCountryStateResponse, error) { - rsp, err := c.GetCountryState(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCountryStateResponse(rsp) -} - -// GetCurrenciesWithResponse request returning *GetCurrenciesResponse -func (c *ClientWithResponses) GetCurrenciesWithResponse(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*GetCurrenciesResponse, error) { - rsp, err := c.GetCurrencies(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrenciesResponse(rsp) -} - -// GetCurrencyWithResponse request returning *GetCurrencyResponse -func (c *ClientWithResponses) GetCurrencyWithResponse(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*GetCurrencyResponse, error) { - rsp, err := c.GetCurrency(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetCurrencyResponse(rsp) -} - -// GetDataCentersWithResponse request returning *GetDataCentersResponse -func (c *ClientWithResponses) GetDataCentersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDataCentersResponse, error) { - rsp, err := c.GetDataCenters(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDataCentersResponse(rsp) -} - -// GetDataCenterWithResponse request returning *GetDataCenterResponse -func (c *ClientWithResponses) GetDataCenterWithResponse(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*GetDataCenterResponse, error) { - rsp, err := c.GetDataCenter(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDataCenterResponse(rsp) -} - -// GetDataCenterDefaultNetworkWithResponse request returning *GetDataCenterDefaultNetworkResponse -func (c *ClientWithResponses) GetDataCenterDefaultNetworkWithResponse(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*GetDataCenterDefaultNetworkResponse, error) { - rsp, err := c.GetDataCenterDefaultNetwork(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDataCenterDefaultNetworkResponse(rsp) -} - -// GetDataCenterGpuTypesWithResponse request returning *GetDataCenterGpuTypesResponse -func (c *ClientWithResponses) GetDataCenterGpuTypesWithResponse(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*GetDataCenterGpuTypesResponse, error) { - rsp, err := c.GetDataCenterGpuTypes(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDataCenterGpuTypesResponse(rsp) -} - -// DeleteDiskBackupPolicyWithBodyWithResponse request with arbitrary body returning *DeleteDiskBackupPolicyResponse -func (c *ClientWithResponses) DeleteDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) { - rsp, err := c.DeleteDiskBackupPolicyWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDiskBackupPolicyResponse(rsp) -} - -func (c *ClientWithResponses) DeleteDiskBackupPolicyWithResponse(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) { - rsp, err := c.DeleteDiskBackupPolicy(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDiskBackupPolicyResponse(rsp) -} - -// GetDiskBackupPolicyWithResponse request returning *GetDiskBackupPolicyResponse -func (c *ClientWithResponses) GetDiskBackupPolicyWithResponse(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*GetDiskBackupPolicyResponse, error) { - rsp, err := c.GetDiskBackupPolicy(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDiskBackupPolicyResponse(rsp) -} - -// PatchDiskBackupPolicyWithBodyWithResponse request with arbitrary body returning *PatchDiskBackupPolicyResponse -func (c *ClientWithResponses) PatchDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) { - rsp, err := c.PatchDiskBackupPolicyWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchDiskBackupPolicyResponse(rsp) -} - -func (c *ClientWithResponses) PatchDiskBackupPolicyWithResponse(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) { - rsp, err := c.PatchDiskBackupPolicy(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchDiskBackupPolicyResponse(rsp) -} - -// DeleteDiskBackupPolicyScheduleWithBodyWithResponse request with arbitrary body returning *DeleteDiskBackupPolicyScheduleResponse -func (c *ClientWithResponses) DeleteDiskBackupPolicyScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) { - rsp, err := c.DeleteDiskBackupPolicyScheduleWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDiskBackupPolicyScheduleResponse(rsp) -} - -func (c *ClientWithResponses) DeleteDiskBackupPolicyScheduleWithResponse(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) { - rsp, err := c.DeleteDiskBackupPolicySchedule(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDiskBackupPolicyScheduleResponse(rsp) -} - -// GetDiskTemplateVersionWithResponse request returning *GetDiskTemplateVersionResponse -func (c *ClientWithResponses) GetDiskTemplateVersionWithResponse(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionResponse, error) { - rsp, err := c.GetDiskTemplateVersion(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDiskTemplateVersionResponse(rsp) -} - -// GetDiskTemplateVersionSpecWithResponse request returning *GetDiskTemplateVersionSpecResponse -func (c *ClientWithResponses) GetDiskTemplateVersionSpecWithResponse(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionSpecResponse, error) { - rsp, err := c.GetDiskTemplateVersionSpec(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDiskTemplateVersionSpecResponse(rsp) -} - -// GetDiskTemplateWithResponse request returning *GetDiskTemplateResponse -func (c *ClientWithResponses) GetDiskTemplateWithResponse(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateResponse, error) { - rsp, err := c.GetDiskTemplate(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDiskTemplateResponse(rsp) -} - -// GetDiskTemplateVersionsWithResponse request returning *GetDiskTemplateVersionsResponse -func (c *ClientWithResponses) GetDiskTemplateVersionsWithResponse(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionsResponse, error) { - rsp, err := c.GetDiskTemplateVersions(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDiskTemplateVersionsResponse(rsp) -} - -// GetDiskWithResponse request returning *GetDiskResponse -func (c *ClientWithResponses) GetDiskWithResponse(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*GetDiskResponse, error) { - rsp, err := c.GetDisk(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDiskResponse(rsp) -} - -// GetDiskDiskBackupPoliciesWithResponse request returning *GetDiskDiskBackupPoliciesResponse -func (c *ClientWithResponses) GetDiskDiskBackupPoliciesWithResponse(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetDiskDiskBackupPoliciesResponse, error) { - rsp, err := c.GetDiskDiskBackupPolicies(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDiskDiskBackupPoliciesResponse(rsp) -} - -// PostDiskDiskBackupPoliciesWithBodyWithResponse request with arbitrary body returning *PostDiskDiskBackupPoliciesResponse -func (c *ClientWithResponses) PostDiskDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) { - rsp, err := c.PostDiskDiskBackupPoliciesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostDiskDiskBackupPoliciesResponse(rsp) -} - -func (c *ClientWithResponses) PostDiskDiskBackupPoliciesWithResponse(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) { - rsp, err := c.PostDiskDiskBackupPolicies(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostDiskDiskBackupPoliciesResponse(rsp) -} - -// DeleteDnsRecordWithBodyWithResponse request with arbitrary body returning *DeleteDnsRecordResponse -func (c *ClientWithResponses) DeleteDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) { - rsp, err := c.DeleteDnsRecordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDnsRecordResponse(rsp) -} - -func (c *ClientWithResponses) DeleteDnsRecordWithResponse(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) { - rsp, err := c.DeleteDnsRecord(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDnsRecordResponse(rsp) -} - -// GetDnsRecordWithResponse request returning *GetDnsRecordResponse -func (c *ClientWithResponses) GetDnsRecordWithResponse(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*GetDnsRecordResponse, error) { - rsp, err := c.GetDnsRecord(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDnsRecordResponse(rsp) -} - -// PatchDnsRecordWithBodyWithResponse request with arbitrary body returning *PatchDnsRecordResponse -func (c *ClientWithResponses) PatchDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) { - rsp, err := c.PatchDnsRecordWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchDnsRecordResponse(rsp) -} - -func (c *ClientWithResponses) PatchDnsRecordWithResponse(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) { - rsp, err := c.PatchDnsRecord(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchDnsRecordResponse(rsp) -} - -// DeleteDnsZoneWithBodyWithResponse request with arbitrary body returning *DeleteDnsZoneResponse -func (c *ClientWithResponses) DeleteDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) { - rsp, err := c.DeleteDnsZoneWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDnsZoneResponse(rsp) -} - -func (c *ClientWithResponses) DeleteDnsZoneWithResponse(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) { - rsp, err := c.DeleteDnsZone(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteDnsZoneResponse(rsp) -} - -// GetDnsZoneWithResponse request returning *GetDnsZoneResponse -func (c *ClientWithResponses) GetDnsZoneWithResponse(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*GetDnsZoneResponse, error) { - rsp, err := c.GetDnsZone(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDnsZoneResponse(rsp) -} - -// PatchDnsZoneWithBodyWithResponse request with arbitrary body returning *PatchDnsZoneResponse -func (c *ClientWithResponses) PatchDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) { - rsp, err := c.PatchDnsZoneWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchDnsZoneResponse(rsp) -} - -func (c *ClientWithResponses) PatchDnsZoneWithResponse(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) { - rsp, err := c.PatchDnsZone(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchDnsZoneResponse(rsp) -} - -// GetDnsZoneRecordsWithResponse request returning *GetDnsZoneRecordsResponse -func (c *ClientWithResponses) GetDnsZoneRecordsWithResponse(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*GetDnsZoneRecordsResponse, error) { - rsp, err := c.GetDnsZoneRecords(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetDnsZoneRecordsResponse(rsp) -} - -// PostDnsZoneRecordsWithBodyWithResponse request with arbitrary body returning *PostDnsZoneRecordsResponse -func (c *ClientWithResponses) PostDnsZoneRecordsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) { - rsp, err := c.PostDnsZoneRecordsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostDnsZoneRecordsResponse(rsp) -} - -func (c *ClientWithResponses) PostDnsZoneRecordsWithResponse(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) { - rsp, err := c.PostDnsZoneRecords(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostDnsZoneRecordsResponse(rsp) -} - -// PostDnsZoneVerifyWithBodyWithResponse request with arbitrary body returning *PostDnsZoneVerifyResponse -func (c *ClientWithResponses) PostDnsZoneVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) { - rsp, err := c.PostDnsZoneVerifyWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostDnsZoneVerifyResponse(rsp) -} - -func (c *ClientWithResponses) PostDnsZoneVerifyWithResponse(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) { - rsp, err := c.PostDnsZoneVerify(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostDnsZoneVerifyResponse(rsp) -} - -// DeleteFileStorageVolumeWithBodyWithResponse request with arbitrary body returning *DeleteFileStorageVolumeResponse -func (c *ClientWithResponses) DeleteFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) { - rsp, err := c.DeleteFileStorageVolumeWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteFileStorageVolumeResponse(rsp) -} - -func (c *ClientWithResponses) DeleteFileStorageVolumeWithResponse(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) { - rsp, err := c.DeleteFileStorageVolume(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteFileStorageVolumeResponse(rsp) -} - -// GetFileStorageVolumeWithResponse request returning *GetFileStorageVolumeResponse -func (c *ClientWithResponses) GetFileStorageVolumeWithResponse(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*GetFileStorageVolumeResponse, error) { - rsp, err := c.GetFileStorageVolume(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetFileStorageVolumeResponse(rsp) -} - -// PatchFileStorageVolumeWithBodyWithResponse request with arbitrary body returning *PatchFileStorageVolumeResponse -func (c *ClientWithResponses) PatchFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) { - rsp, err := c.PatchFileStorageVolumeWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchFileStorageVolumeResponse(rsp) -} - -func (c *ClientWithResponses) PatchFileStorageVolumeWithResponse(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) { - rsp, err := c.PatchFileStorageVolume(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchFileStorageVolumeResponse(rsp) -} - -// GetGpuTypesWithResponse request returning *GetGpuTypesResponse -func (c *ClientWithResponses) GetGpuTypesWithResponse(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*GetGpuTypesResponse, error) { - rsp, err := c.GetGpuTypes(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetGpuTypesResponse(rsp) -} - -// GetGpuTypeWithResponse request returning *GetGpuTypeResponse -func (c *ClientWithResponses) GetGpuTypeWithResponse(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*GetGpuTypeResponse, error) { - rsp, err := c.GetGpuType(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetGpuTypeResponse(rsp) -} - -// PostInvalidateLinkedWebSessionWithBodyWithResponse request with arbitrary body returning *PostInvalidateLinkedWebSessionResponse -func (c *ClientWithResponses) PostInvalidateLinkedWebSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) { - rsp, err := c.PostInvalidateLinkedWebSessionWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostInvalidateLinkedWebSessionResponse(rsp) -} - -func (c *ClientWithResponses) PostInvalidateLinkedWebSessionWithResponse(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) { - rsp, err := c.PostInvalidateLinkedWebSession(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostInvalidateLinkedWebSessionResponse(rsp) -} - -// DeleteIpAddressWithBodyWithResponse request with arbitrary body returning *DeleteIpAddressResponse -func (c *ClientWithResponses) DeleteIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) { - rsp, err := c.DeleteIpAddressWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteIpAddressResponse(rsp) -} - -func (c *ClientWithResponses) DeleteIpAddressWithResponse(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) { - rsp, err := c.DeleteIpAddress(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteIpAddressResponse(rsp) -} - -// GetIpAddressWithResponse request returning *GetIpAddressResponse -func (c *ClientWithResponses) GetIpAddressWithResponse(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*GetIpAddressResponse, error) { - rsp, err := c.GetIpAddress(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetIpAddressResponse(rsp) -} - -// PatchIpAddressWithBodyWithResponse request with arbitrary body returning *PatchIpAddressResponse -func (c *ClientWithResponses) PatchIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) { - rsp, err := c.PatchIpAddressWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchIpAddressResponse(rsp) -} - -func (c *ClientWithResponses) PatchIpAddressWithResponse(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) { - rsp, err := c.PatchIpAddress(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchIpAddressResponse(rsp) -} - -// PostIpAddressUnallocateWithBodyWithResponse request with arbitrary body returning *PostIpAddressUnallocateResponse -func (c *ClientWithResponses) PostIpAddressUnallocateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) { - rsp, err := c.PostIpAddressUnallocateWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostIpAddressUnallocateResponse(rsp) -} - -func (c *ClientWithResponses) PostIpAddressUnallocateWithResponse(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) { - rsp, err := c.PostIpAddressUnallocate(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostIpAddressUnallocateResponse(rsp) -} - -// DeleteLoadBalancerWithBodyWithResponse request with arbitrary body returning *DeleteLoadBalancerResponse -func (c *ClientWithResponses) DeleteLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) { - rsp, err := c.DeleteLoadBalancerWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteLoadBalancerResponse(rsp) -} - -func (c *ClientWithResponses) DeleteLoadBalancerWithResponse(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) { - rsp, err := c.DeleteLoadBalancer(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteLoadBalancerResponse(rsp) -} - -// GetLoadBalancerWithResponse request returning *GetLoadBalancerResponse -func (c *ClientWithResponses) GetLoadBalancerWithResponse(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerResponse, error) { - rsp, err := c.GetLoadBalancer(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetLoadBalancerResponse(rsp) -} - -// PatchLoadBalancerWithBodyWithResponse request with arbitrary body returning *PatchLoadBalancerResponse -func (c *ClientWithResponses) PatchLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) { - rsp, err := c.PatchLoadBalancerWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchLoadBalancerResponse(rsp) -} - -func (c *ClientWithResponses) PatchLoadBalancerWithResponse(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) { - rsp, err := c.PatchLoadBalancer(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchLoadBalancerResponse(rsp) -} - -// GetLoadBalancerRulesWithResponse request returning *GetLoadBalancerRulesResponse -func (c *ClientWithResponses) GetLoadBalancerRulesWithResponse(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerRulesResponse, error) { - rsp, err := c.GetLoadBalancerRules(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetLoadBalancerRulesResponse(rsp) -} - -// PostLoadBalancerRulesWithBodyWithResponse request with arbitrary body returning *PostLoadBalancerRulesResponse -func (c *ClientWithResponses) PostLoadBalancerRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) { - rsp, err := c.PostLoadBalancerRulesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostLoadBalancerRulesResponse(rsp) -} - -func (c *ClientWithResponses) PostLoadBalancerRulesWithResponse(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) { - rsp, err := c.PostLoadBalancerRules(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostLoadBalancerRulesResponse(rsp) -} - -// DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with arbitrary body returning *DeleteLoadBalancersRulesLoadBalancerRuleResponse -func (c *ClientWithResponses) DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) { - rsp, err := c.DeleteLoadBalancersRulesLoadBalancerRuleWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse(rsp) -} - -func (c *ClientWithResponses) DeleteLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) { - rsp, err := c.DeleteLoadBalancersRulesLoadBalancerRule(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse(rsp) -} - -// GetLoadBalancersRulesLoadBalancerRuleWithResponse request returning *GetLoadBalancersRulesLoadBalancerRuleResponse -func (c *ClientWithResponses) GetLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*GetLoadBalancersRulesLoadBalancerRuleResponse, error) { - rsp, err := c.GetLoadBalancersRulesLoadBalancerRule(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetLoadBalancersRulesLoadBalancerRuleResponse(rsp) -} - -// PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with arbitrary body returning *PatchLoadBalancersRulesLoadBalancerRuleResponse -func (c *ClientWithResponses) PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) { - rsp, err := c.PatchLoadBalancersRulesLoadBalancerRuleWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchLoadBalancersRulesLoadBalancerRuleResponse(rsp) -} - -func (c *ClientWithResponses) PatchLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) { - rsp, err := c.PatchLoadBalancersRulesLoadBalancerRule(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchLoadBalancersRulesLoadBalancerRuleResponse(rsp) -} - -// GetNetworkWithResponse request returning *GetNetworkResponse -func (c *ClientWithResponses) GetNetworkWithResponse(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*GetNetworkResponse, error) { - rsp, err := c.GetNetwork(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetNetworkResponse(rsp) -} - -// GetOperatingSystemsWithResponse request returning *GetOperatingSystemsResponse -func (c *ClientWithResponses) GetOperatingSystemsWithResponse(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemsResponse, error) { - rsp, err := c.GetOperatingSystems(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOperatingSystemsResponse(rsp) -} - -// GetOperatingSystemWithResponse request returning *GetOperatingSystemResponse -func (c *ClientWithResponses) GetOperatingSystemWithResponse(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemResponse, error) { - rsp, err := c.GetOperatingSystem(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOperatingSystemResponse(rsp) -} - -// GetOrganizationsWithResponse request returning *GetOrganizationsResponse -func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { - rsp, err := c.GetOrganizations(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationsResponse(rsp) -} - -// GetOrganizationWithResponse request returning *GetOrganizationResponse -func (c *ClientWithResponses) GetOrganizationWithResponse(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error) { - rsp, err := c.GetOrganization(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationResponse(rsp) -} - -// GetOrganizationAvailableNetworksWithResponse request returning *GetOrganizationAvailableNetworksResponse -func (c *ClientWithResponses) GetOrganizationAvailableNetworksWithResponse(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*GetOrganizationAvailableNetworksResponse, error) { - rsp, err := c.GetOrganizationAvailableNetworks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationAvailableNetworksResponse(rsp) -} - -// GetOrganizationCertificatesWithResponse request returning *GetOrganizationCertificatesResponse -func (c *ClientWithResponses) GetOrganizationCertificatesWithResponse(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationCertificatesResponse, error) { - rsp, err := c.GetOrganizationCertificates(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationCertificatesResponse(rsp) -} - -// GetOrganizationDiskBackupPoliciesWithResponse request returning *GetOrganizationDiskBackupPoliciesResponse -func (c *ClientWithResponses) GetOrganizationDiskBackupPoliciesWithResponse(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskBackupPoliciesResponse, error) { - rsp, err := c.GetOrganizationDiskBackupPolicies(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationDiskBackupPoliciesResponse(rsp) -} - -// GetOrganizationDiskTemplatesWithResponse request returning *GetOrganizationDiskTemplatesResponse -func (c *ClientWithResponses) GetOrganizationDiskTemplatesWithResponse(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskTemplatesResponse, error) { - rsp, err := c.GetOrganizationDiskTemplates(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationDiskTemplatesResponse(rsp) -} - -// GetOrganizationDisksWithResponse request returning *GetOrganizationDisksResponse -func (c *ClientWithResponses) GetOrganizationDisksWithResponse(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*GetOrganizationDisksResponse, error) { - rsp, err := c.GetOrganizationDisks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationDisksResponse(rsp) -} - -// GetOrganizationDnsZonesWithResponse request returning *GetOrganizationDnsZonesResponse -func (c *ClientWithResponses) GetOrganizationDnsZonesWithResponse(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesResponse, error) { - rsp, err := c.GetOrganizationDnsZones(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationDnsZonesResponse(rsp) -} - -// PostOrganizationDnsZonesWithBodyWithResponse request with arbitrary body returning *PostOrganizationDnsZonesResponse -func (c *ClientWithResponses) PostOrganizationDnsZonesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) { - rsp, err := c.PostOrganizationDnsZonesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationDnsZonesResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationDnsZonesWithResponse(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) { - rsp, err := c.PostOrganizationDnsZones(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationDnsZonesResponse(rsp) -} - -// GetOrganizationDnsZonesNameserversWithResponse request returning *GetOrganizationDnsZonesNameserversResponse -func (c *ClientWithResponses) GetOrganizationDnsZonesNameserversWithResponse(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesNameserversResponse, error) { - rsp, err := c.GetOrganizationDnsZonesNameservers(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationDnsZonesNameserversResponse(rsp) -} - -// GetOrganizationFileStorageVolumesWithResponse request returning *GetOrganizationFileStorageVolumesResponse -func (c *ClientWithResponses) GetOrganizationFileStorageVolumesWithResponse(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*GetOrganizationFileStorageVolumesResponse, error) { - rsp, err := c.GetOrganizationFileStorageVolumes(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationFileStorageVolumesResponse(rsp) -} - -// PostOrganizationFileStorageVolumesWithBodyWithResponse request with arbitrary body returning *PostOrganizationFileStorageVolumesResponse -func (c *ClientWithResponses) PostOrganizationFileStorageVolumesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) { - rsp, err := c.PostOrganizationFileStorageVolumesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationFileStorageVolumesResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationFileStorageVolumesWithResponse(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) { - rsp, err := c.PostOrganizationFileStorageVolumes(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationFileStorageVolumesResponse(rsp) -} - -// GetOrganizationIpAddressesWithResponse request returning *GetOrganizationIpAddressesResponse -func (c *ClientWithResponses) GetOrganizationIpAddressesWithResponse(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*GetOrganizationIpAddressesResponse, error) { - rsp, err := c.GetOrganizationIpAddresses(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationIpAddressesResponse(rsp) -} - -// PostOrganizationIpAddressesWithBodyWithResponse request with arbitrary body returning *PostOrganizationIpAddressesResponse -func (c *ClientWithResponses) PostOrganizationIpAddressesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) { - rsp, err := c.PostOrganizationIpAddressesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationIpAddressesResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationIpAddressesWithResponse(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) { - rsp, err := c.PostOrganizationIpAddresses(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationIpAddressesResponse(rsp) -} - -// GetOrganizationLoadBalancersWithResponse request returning *GetOrganizationLoadBalancersResponse -func (c *ClientWithResponses) GetOrganizationLoadBalancersWithResponse(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*GetOrganizationLoadBalancersResponse, error) { - rsp, err := c.GetOrganizationLoadBalancers(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationLoadBalancersResponse(rsp) -} - -// PostOrganizationLoadBalancersWithBodyWithResponse request with arbitrary body returning *PostOrganizationLoadBalancersResponse -func (c *ClientWithResponses) PostOrganizationLoadBalancersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) { - rsp, err := c.PostOrganizationLoadBalancersWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationLoadBalancersResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationLoadBalancersWithResponse(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) { - rsp, err := c.PostOrganizationLoadBalancers(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationLoadBalancersResponse(rsp) -} - -// GetOrganizationManagedWithResponse request returning *GetOrganizationManagedResponse -func (c *ClientWithResponses) GetOrganizationManagedWithResponse(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*GetOrganizationManagedResponse, error) { - rsp, err := c.GetOrganizationManaged(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationManagedResponse(rsp) -} - -// PostOrganizationManagedWithBodyWithResponse request with arbitrary body returning *PostOrganizationManagedResponse -func (c *ClientWithResponses) PostOrganizationManagedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) { - rsp, err := c.PostOrganizationManagedWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationManagedResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationManagedWithResponse(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) { - rsp, err := c.PostOrganizationManaged(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationManagedResponse(rsp) -} - -// GetOrganizationNetworkSpeedProfilesWithResponse request returning *GetOrganizationNetworkSpeedProfilesResponse -func (c *ClientWithResponses) GetOrganizationNetworkSpeedProfilesWithResponse(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*GetOrganizationNetworkSpeedProfilesResponse, error) { - rsp, err := c.GetOrganizationNetworkSpeedProfiles(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationNetworkSpeedProfilesResponse(rsp) -} - -// GetOrganizationSecurityGroupsWithResponse request returning *GetOrganizationSecurityGroupsResponse -func (c *ClientWithResponses) GetOrganizationSecurityGroupsWithResponse(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationSecurityGroupsResponse, error) { - rsp, err := c.GetOrganizationSecurityGroups(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationSecurityGroupsResponse(rsp) -} - -// PostOrganizationSecurityGroupsWithBodyWithResponse request with arbitrary body returning *PostOrganizationSecurityGroupsResponse -func (c *ClientWithResponses) PostOrganizationSecurityGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) { - rsp, err := c.PostOrganizationSecurityGroupsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationSecurityGroupsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationSecurityGroupsWithResponse(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) { - rsp, err := c.PostOrganizationSecurityGroups(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationSecurityGroupsResponse(rsp) -} - -// GetOrganizationSshKeysWithResponse request returning *GetOrganizationSshKeysResponse -func (c *ClientWithResponses) GetOrganizationSshKeysWithResponse(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*GetOrganizationSshKeysResponse, error) { - rsp, err := c.GetOrganizationSshKeys(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationSshKeysResponse(rsp) -} - -// PostOrganizationSshKeysWithBodyWithResponse request with arbitrary body returning *PostOrganizationSshKeysResponse -func (c *ClientWithResponses) PostOrganizationSshKeysWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) { - rsp, err := c.PostOrganizationSshKeysWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationSshKeysResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationSshKeysWithResponse(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) { - rsp, err := c.PostOrganizationSshKeys(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationSshKeysResponse(rsp) -} - -// GetOrganizationTagsWithResponse request returning *GetOrganizationTagsResponse -func (c *ClientWithResponses) GetOrganizationTagsWithResponse(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTagsResponse, error) { - rsp, err := c.GetOrganizationTags(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationTagsResponse(rsp) -} - -// PostOrganizationTagsWithBodyWithResponse request with arbitrary body returning *PostOrganizationTagsResponse -func (c *ClientWithResponses) PostOrganizationTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) { - rsp, err := c.PostOrganizationTagsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationTagsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationTagsWithResponse(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) { - rsp, err := c.PostOrganizationTags(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationTagsResponse(rsp) -} - -// GetOrganizationTrashObjectsWithResponse request returning *GetOrganizationTrashObjectsResponse -func (c *ClientWithResponses) GetOrganizationTrashObjectsWithResponse(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTrashObjectsResponse, error) { - rsp, err := c.GetOrganizationTrashObjects(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationTrashObjectsResponse(rsp) -} - -// PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse request with arbitrary body returning *PostOrganizationTrashObjectsPurgeAllResponse -func (c *ClientWithResponses) PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) { - rsp, err := c.PostOrganizationTrashObjectsPurgeAllWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationTrashObjectsPurgeAllResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationTrashObjectsPurgeAllWithResponse(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) { - rsp, err := c.PostOrganizationTrashObjectsPurgeAll(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationTrashObjectsPurgeAllResponse(rsp) -} - -// GetOrganizationUsersWithAccessWithResponse request returning *GetOrganizationUsersWithAccessResponse -func (c *ClientWithResponses) GetOrganizationUsersWithAccessWithResponse(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*GetOrganizationUsersWithAccessResponse, error) { - rsp, err := c.GetOrganizationUsersWithAccess(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationUsersWithAccessResponse(rsp) -} - -// GetOrganizationVirtualMachineGroupsWithResponse request returning *GetOrganizationVirtualMachineGroupsResponse -func (c *ClientWithResponses) GetOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachineGroupsResponse, error) { - rsp, err := c.GetOrganizationVirtualMachineGroups(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationVirtualMachineGroupsResponse(rsp) -} - -// PostOrganizationVirtualMachineGroupsWithBodyWithResponse request with arbitrary body returning *PostOrganizationVirtualMachineGroupsResponse -func (c *ClientWithResponses) PostOrganizationVirtualMachineGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) { - rsp, err := c.PostOrganizationVirtualMachineGroupsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationVirtualMachineGroupsResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) { - rsp, err := c.PostOrganizationVirtualMachineGroups(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationVirtualMachineGroupsResponse(rsp) -} - -// GetOrganizationVirtualMachinesWithResponse request returning *GetOrganizationVirtualMachinesResponse -func (c *ClientWithResponses) GetOrganizationVirtualMachinesWithResponse(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachinesResponse, error) { - rsp, err := c.GetOrganizationVirtualMachines(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetOrganizationVirtualMachinesResponse(rsp) -} - -// PostOrganizationVirtualMachinesBuildWithBodyWithResponse request with arbitrary body returning *PostOrganizationVirtualMachinesBuildResponse -func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) { - rsp, err := c.PostOrganizationVirtualMachinesBuildWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationVirtualMachinesBuildResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) { - rsp, err := c.PostOrganizationVirtualMachinesBuild(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationVirtualMachinesBuildResponse(rsp) -} - -// PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse request with arbitrary body returning *PostOrganizationVirtualMachinesBuildFromSpecResponse -func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) { - rsp, err := c.PostOrganizationVirtualMachinesBuildFromSpecWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationVirtualMachinesBuildFromSpecResponse(rsp) -} - -func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildFromSpecWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) { - rsp, err := c.PostOrganizationVirtualMachinesBuildFromSpec(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostOrganizationVirtualMachinesBuildFromSpecResponse(rsp) -} - -// DeleteSecurityGroupWithBodyWithResponse request with arbitrary body returning *DeleteSecurityGroupResponse -func (c *ClientWithResponses) DeleteSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) { - rsp, err := c.DeleteSecurityGroupWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSecurityGroupResponse(rsp) -} - -func (c *ClientWithResponses) DeleteSecurityGroupWithResponse(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) { - rsp, err := c.DeleteSecurityGroup(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSecurityGroupResponse(rsp) -} - -// GetSecurityGroupWithResponse request returning *GetSecurityGroupResponse -func (c *ClientWithResponses) GetSecurityGroupWithResponse(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupResponse, error) { - rsp, err := c.GetSecurityGroup(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSecurityGroupResponse(rsp) -} - -// PatchSecurityGroupWithBodyWithResponse request with arbitrary body returning *PatchSecurityGroupResponse -func (c *ClientWithResponses) PatchSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) { - rsp, err := c.PatchSecurityGroupWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchSecurityGroupResponse(rsp) -} - -func (c *ClientWithResponses) PatchSecurityGroupWithResponse(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) { - rsp, err := c.PatchSecurityGroup(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchSecurityGroupResponse(rsp) -} - -// GetSecurityGroupRulesWithResponse request returning *GetSecurityGroupRulesResponse -func (c *ClientWithResponses) GetSecurityGroupRulesWithResponse(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupRulesResponse, error) { - rsp, err := c.GetSecurityGroupRules(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSecurityGroupRulesResponse(rsp) -} - -// PostSecurityGroupRulesWithBodyWithResponse request with arbitrary body returning *PostSecurityGroupRulesResponse -func (c *ClientWithResponses) PostSecurityGroupRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) { - rsp, err := c.PostSecurityGroupRulesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostSecurityGroupRulesResponse(rsp) -} - -func (c *ClientWithResponses) PostSecurityGroupRulesWithResponse(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) { - rsp, err := c.PostSecurityGroupRules(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostSecurityGroupRulesResponse(rsp) -} - -// DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with arbitrary body returning *DeleteSecurityGroupsRulesSecurityGroupRuleResponse -func (c *ClientWithResponses) DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) { - rsp, err := c.DeleteSecurityGroupsRulesSecurityGroupRuleWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse(rsp) -} - -func (c *ClientWithResponses) DeleteSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) { - rsp, err := c.DeleteSecurityGroupsRulesSecurityGroupRule(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse(rsp) -} - -// GetSecurityGroupsRulesSecurityGroupRuleWithResponse request returning *GetSecurityGroupsRulesSecurityGroupRuleResponse -func (c *ClientWithResponses) GetSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupsRulesSecurityGroupRuleResponse, error) { - rsp, err := c.GetSecurityGroupsRulesSecurityGroupRule(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetSecurityGroupsRulesSecurityGroupRuleResponse(rsp) -} - -// PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with arbitrary body returning *PatchSecurityGroupsRulesSecurityGroupRuleResponse -func (c *ClientWithResponses) PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) { - rsp, err := c.PatchSecurityGroupsRulesSecurityGroupRuleWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse(rsp) -} - -func (c *ClientWithResponses) PatchSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) { - rsp, err := c.PatchSecurityGroupsRulesSecurityGroupRule(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse(rsp) -} - -// DeleteSshKeyWithBodyWithResponse request with arbitrary body returning *DeleteSshKeyResponse -func (c *ClientWithResponses) DeleteSshKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) { - rsp, err := c.DeleteSshKeyWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSshKeyResponse(rsp) -} - -func (c *ClientWithResponses) DeleteSshKeyWithResponse(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) { - rsp, err := c.DeleteSshKey(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteSshKeyResponse(rsp) -} - -// DeleteTagWithBodyWithResponse request with arbitrary body returning *DeleteTagResponse -func (c *ClientWithResponses) DeleteTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) { - rsp, err := c.DeleteTagWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTagResponse(rsp) -} - -func (c *ClientWithResponses) DeleteTagWithResponse(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) { - rsp, err := c.DeleteTag(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTagResponse(rsp) -} - -// GetTagWithResponse request returning *GetTagResponse -func (c *ClientWithResponses) GetTagWithResponse(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*GetTagResponse, error) { - rsp, err := c.GetTag(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTagResponse(rsp) -} - -// PatchTagWithBodyWithResponse request with arbitrary body returning *PatchTagResponse -func (c *ClientWithResponses) PatchTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) { - rsp, err := c.PatchTagWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchTagResponse(rsp) -} - -func (c *ClientWithResponses) PatchTagWithResponse(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) { - rsp, err := c.PatchTag(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchTagResponse(rsp) -} - -// GetTaskWithResponse request returning *GetTaskResponse -func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) { - rsp, err := c.GetTask(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTaskResponse(rsp) -} - -// DeleteTrashObjectWithBodyWithResponse request with arbitrary body returning *DeleteTrashObjectResponse -func (c *ClientWithResponses) DeleteTrashObjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) { - rsp, err := c.DeleteTrashObjectWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTrashObjectResponse(rsp) -} - -func (c *ClientWithResponses) DeleteTrashObjectWithResponse(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) { - rsp, err := c.DeleteTrashObject(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteTrashObjectResponse(rsp) -} - -// GetTrashObjectWithResponse request returning *GetTrashObjectResponse -func (c *ClientWithResponses) GetTrashObjectWithResponse(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*GetTrashObjectResponse, error) { - rsp, err := c.GetTrashObject(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetTrashObjectResponse(rsp) -} - -// PostTrashObjectRestoreWithBodyWithResponse request with arbitrary body returning *PostTrashObjectRestoreResponse -func (c *ClientWithResponses) PostTrashObjectRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) { - rsp, err := c.PostTrashObjectRestoreWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostTrashObjectRestoreResponse(rsp) -} - -func (c *ClientWithResponses) PostTrashObjectRestoreWithResponse(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) { - rsp, err := c.PostTrashObjectRestore(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostTrashObjectRestoreResponse(rsp) -} - -// GetUsersCurrentWithResponse request returning *GetUsersCurrentResponse -func (c *ClientWithResponses) GetUsersCurrentWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsersCurrentResponse, error) { - rsp, err := c.GetUsersCurrent(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetUsersCurrentResponse(rsp) -} - -// DeleteVirtualMachineGroupWithBodyWithResponse request with arbitrary body returning *DeleteVirtualMachineGroupResponse -func (c *ClientWithResponses) DeleteVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) { - rsp, err := c.DeleteVirtualMachineGroupWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteVirtualMachineGroupResponse(rsp) -} - -func (c *ClientWithResponses) DeleteVirtualMachineGroupWithResponse(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) { - rsp, err := c.DeleteVirtualMachineGroup(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteVirtualMachineGroupResponse(rsp) -} - -// GetVirtualMachineGroupWithResponse request returning *GetVirtualMachineGroupResponse -func (c *ClientWithResponses) GetVirtualMachineGroupWithResponse(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineGroupResponse, error) { - rsp, err := c.GetVirtualMachineGroup(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachineGroupResponse(rsp) -} - -// PatchVirtualMachineGroupWithBodyWithResponse request with arbitrary body returning *PatchVirtualMachineGroupResponse -func (c *ClientWithResponses) PatchVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) { - rsp, err := c.PatchVirtualMachineGroupWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchVirtualMachineGroupResponse(rsp) -} - -func (c *ClientWithResponses) PatchVirtualMachineGroupWithResponse(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) { - rsp, err := c.PatchVirtualMachineGroup(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchVirtualMachineGroupResponse(rsp) -} - -// GetVMNIVMNIWithResponse request returning *GetVMNIVMNIResponse -func (c *ClientWithResponses) GetVMNIVMNIWithResponse(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*GetVMNIVMNIResponse, error) { - rsp, err := c.GetVMNIVMNI(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVMNIVMNIResponse(rsp) -} - -// PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineNetworkInterfaceAllocateIpResponse -func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) { - rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateIpWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) { - rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateIp(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse(rsp) -} - -// PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineNetworkInterfaceAllocateNewIpResponse -func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) { - rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateNewIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) { - rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateNewIp(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse(rsp) -} - -// GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse request returning *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse -func (c *ClientWithResponses) GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse, error) { - rsp, err := c.GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse(rsp) -} - -// PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse request with arbitrary body returning *PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse -func (c *ClientWithResponses) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) { - rsp, err := c.PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse(rsp) -} - -func (c *ClientWithResponses) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithResponse(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) { - rsp, err := c.PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse(rsp) -} - -// GetVirtualMachinePackagesWithResponse request returning *GetVirtualMachinePackagesResponse -func (c *ClientWithResponses) GetVirtualMachinePackagesWithResponse(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackagesResponse, error) { - rsp, err := c.GetVirtualMachinePackages(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachinePackagesResponse(rsp) -} - -// GetVirtualMachinePackageWithResponse request returning *GetVirtualMachinePackageResponse -func (c *ClientWithResponses) GetVirtualMachinePackageWithResponse(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackageResponse, error) { - rsp, err := c.GetVirtualMachinePackage(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachinePackageResponse(rsp) -} - -// DeleteVirtualMachineWithBodyWithResponse request with arbitrary body returning *DeleteVirtualMachineResponse -func (c *ClientWithResponses) DeleteVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) { - rsp, err := c.DeleteVirtualMachineWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteVirtualMachineResponse(rsp) -} - -func (c *ClientWithResponses) DeleteVirtualMachineWithResponse(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) { - rsp, err := c.DeleteVirtualMachine(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParseDeleteVirtualMachineResponse(rsp) -} - -// GetVirtualMachineWithResponse request returning *GetVirtualMachineResponse -func (c *ClientWithResponses) GetVirtualMachineWithResponse(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineResponse, error) { - rsp, err := c.GetVirtualMachine(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachineResponse(rsp) -} - -// PatchVirtualMachineWithBodyWithResponse request with arbitrary body returning *PatchVirtualMachineResponse -func (c *ClientWithResponses) PatchVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) { - rsp, err := c.PatchVirtualMachineWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchVirtualMachineResponse(rsp) -} - -func (c *ClientWithResponses) PatchVirtualMachineWithResponse(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) { - rsp, err := c.PatchVirtualMachine(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePatchVirtualMachineResponse(rsp) -} - -// PostVirtualMachineAllocateIpWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineAllocateIpResponse -func (c *ClientWithResponses) PostVirtualMachineAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) { - rsp, err := c.PostVirtualMachineAllocateIpWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineAllocateIpResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) { - rsp, err := c.PostVirtualMachineAllocateIp(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineAllocateIpResponse(rsp) -} - -// PostVirtualMachineConsoleSessionsWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineConsoleSessionsResponse -func (c *ClientWithResponses) PostVirtualMachineConsoleSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) { - rsp, err := c.PostVirtualMachineConsoleSessionsWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineConsoleSessionsResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineConsoleSessionsWithResponse(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) { - rsp, err := c.PostVirtualMachineConsoleSessions(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineConsoleSessionsResponse(rsp) -} - -// GetVirtualMachineDiskBackupPoliciesWithResponse request returning *GetVirtualMachineDiskBackupPoliciesResponse -func (c *ClientWithResponses) GetVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDiskBackupPoliciesResponse, error) { - rsp, err := c.GetVirtualMachineDiskBackupPolicies(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachineDiskBackupPoliciesResponse(rsp) -} - -// PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineDiskBackupPoliciesResponse -func (c *ClientWithResponses) PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) { - rsp, err := c.PostVirtualMachineDiskBackupPoliciesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineDiskBackupPoliciesResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) { - rsp, err := c.PostVirtualMachineDiskBackupPolicies(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineDiskBackupPoliciesResponse(rsp) -} - -// GetVirtualMachineDisksWithResponse request returning *GetVirtualMachineDisksResponse -func (c *ClientWithResponses) GetVirtualMachineDisksWithResponse(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDisksResponse, error) { - rsp, err := c.GetVirtualMachineDisks(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachineDisksResponse(rsp) -} - -// PutVirtualMachineFlexibleResourcesWithBodyWithResponse request with arbitrary body returning *PutVirtualMachineFlexibleResourcesResponse -func (c *ClientWithResponses) PutVirtualMachineFlexibleResourcesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) { - rsp, err := c.PutVirtualMachineFlexibleResourcesWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePutVirtualMachineFlexibleResourcesResponse(rsp) -} - -func (c *ClientWithResponses) PutVirtualMachineFlexibleResourcesWithResponse(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) { - rsp, err := c.PutVirtualMachineFlexibleResources(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePutVirtualMachineFlexibleResourcesResponse(rsp) -} - -// GetVirtualMachineNetworkInterfacesWithResponse request returning *GetVirtualMachineNetworkInterfacesResponse -func (c *ClientWithResponses) GetVirtualMachineNetworkInterfacesWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfacesResponse, error) { - rsp, err := c.GetVirtualMachineNetworkInterfaces(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachineNetworkInterfacesResponse(rsp) -} - -// GetVirtualMachineNetworkInterfaceWithResponse request returning *GetVirtualMachineNetworkInterfaceResponse -func (c *ClientWithResponses) GetVirtualMachineNetworkInterfaceWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceResponse, error) { - rsp, err := c.GetVirtualMachineNetworkInterface(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachineNetworkInterfaceResponse(rsp) -} - -// PutVirtualMachinePackageWithBodyWithResponse request with arbitrary body returning *PutVirtualMachinePackageResponse -func (c *ClientWithResponses) PutVirtualMachinePackageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) { - rsp, err := c.PutVirtualMachinePackageWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePutVirtualMachinePackageResponse(rsp) -} - -func (c *ClientWithResponses) PutVirtualMachinePackageWithResponse(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) { - rsp, err := c.PutVirtualMachinePackage(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePutVirtualMachinePackageResponse(rsp) -} - -// PostVirtualMachineResetWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineResetResponse -func (c *ClientWithResponses) PostVirtualMachineResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) { - rsp, err := c.PostVirtualMachineResetWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineResetResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineResetWithResponse(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) { - rsp, err := c.PostVirtualMachineReset(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineResetResponse(rsp) -} - -// PostVirtualMachineShutdownWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineShutdownResponse -func (c *ClientWithResponses) PostVirtualMachineShutdownWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) { - rsp, err := c.PostVirtualMachineShutdownWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineShutdownResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineShutdownWithResponse(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) { - rsp, err := c.PostVirtualMachineShutdown(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineShutdownResponse(rsp) -} - -// PostVirtualMachineStartWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineStartResponse -func (c *ClientWithResponses) PostVirtualMachineStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) { - rsp, err := c.PostVirtualMachineStartWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineStartResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineStartWithResponse(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) { - rsp, err := c.PostVirtualMachineStart(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineStartResponse(rsp) -} - -// PostVirtualMachineStopWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineStopResponse -func (c *ClientWithResponses) PostVirtualMachineStopWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) { - rsp, err := c.PostVirtualMachineStopWithBody(ctx, contentType, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineStopResponse(rsp) -} - -func (c *ClientWithResponses) PostVirtualMachineStopWithResponse(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) { - rsp, err := c.PostVirtualMachineStop(ctx, body, reqEditors...) - if err != nil { - return nil, err - } - return ParsePostVirtualMachineStopResponse(rsp) -} - -// GetVirtualMachinesBuildsVirtualMachineBuildWithResponse request returning *GetVirtualMachinesBuildsVirtualMachineBuildResponse -func (c *ClientWithResponses) GetVirtualMachinesBuildsVirtualMachineBuildWithResponse(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinesBuildsVirtualMachineBuildResponse, error) { - rsp, err := c.GetVirtualMachinesBuildsVirtualMachineBuild(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetVirtualMachinesBuildsVirtualMachineBuildResponse(rsp) -} - -// GetZonesWithResponse request returning *GetZonesResponse -func (c *ClientWithResponses) GetZonesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetZonesResponse, error) { - rsp, err := c.GetZones(ctx, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetZonesResponse(rsp) -} - -// GetZoneWithResponse request returning *GetZoneResponse -func (c *ClientWithResponses) GetZoneWithResponse(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*GetZoneResponse, error) { - rsp, err := c.GetZone(ctx, params, reqEditors...) - if err != nil { - return nil, err - } - return ParseGetZoneResponse(rsp) -} - -// ParseGetCertificateResponse parses an HTTP response from a GetCertificateWithResponse call -func ParseGetCertificateResponse(rsp *http.Response) (*GetCertificateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCertificateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Certificate []Certificate `json:"certificate"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest CertificateNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetCountriesResponse parses an HTTP response from a GetCountriesWithResponse call -func ParseGetCountriesResponse(rsp *http.Response) (*GetCountriesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCountriesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Countries The list of countries - Countries []GetCountries200ResponseCountries `json:"countries"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetCountryResponse parses an HTTP response from a GetCountryWithResponse call -func ParseGetCountryResponse(rsp *http.Response) (*GetCountryResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCountryResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Country The country details - Country Country `json:"country"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest CountryNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetCountryCountryStatesResponse parses an HTTP response from a GetCountryCountryStatesWithResponse call -func ParseGetCountryCountryStatesResponse(rsp *http.Response) (*GetCountryCountryStatesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCountryCountryStatesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // CountryStates The list of country states for the given country - CountryStates []GetCountryCountryStates200ResponseCountryStates `json:"country_states"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest CountryNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetCountryStateResponse parses an HTTP response from a GetCountryStateWithResponse call -func ParseGetCountryStateResponse(rsp *http.Response) (*GetCountryStateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCountryStateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // CountryState The country state details - CountryState CountryState `json:"country_state"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest CountryStateNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetCurrenciesResponse parses an HTTP response from a GetCurrenciesWithResponse call -func ParseGetCurrenciesResponse(rsp *http.Response) (*GetCurrenciesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCurrenciesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Currencies The list of currencies - Currencies []GetCurrencies200ResponseCurrencies `json:"currencies"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetCurrencyResponse parses an HTTP response from a GetCurrencyWithResponse call -func ParseGetCurrencyResponse(rsp *http.Response) (*GetCurrencyResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetCurrencyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Currency The currency details - Currency Currency `json:"currency"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest CurrencyNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDataCentersResponse parses an HTTP response from a GetDataCentersWithResponse call -func ParseGetDataCentersResponse(rsp *http.Response) (*GetDataCentersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDataCentersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - DataCenters []GetDataCenters200ResponseDataCenters `json:"data_centers"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDataCenterResponse parses an HTTP response from a GetDataCenterWithResponse call -func ParseGetDataCenterResponse(rsp *http.Response) (*GetDataCenterResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDataCenterResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - DataCenter GetDataCenter200ResponseDataCenter `json:"data_center"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DataCenterNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDataCenterDefaultNetworkResponse parses an HTTP response from a GetDataCenterDefaultNetworkWithResponse call -func ParseGetDataCenterDefaultNetworkResponse(rsp *http.Response) (*GetDataCenterDefaultNetworkResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDataCenterDefaultNetworkResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Network The details for the requested network - Network GetDataCenterDefaultNetwork200ResponseNetwork `json:"network"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DataCenterNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDataCenterGpuTypesResponse parses an HTTP response from a GetDataCenterGpuTypesWithResponse call -func ParseGetDataCenterGpuTypesResponse(rsp *http.Response) (*GetDataCenterGpuTypesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDataCenterGpuTypesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - GpuTypes []GetDataCenterGPUTypes200ResponseGPUTypes `json:"gpu_types"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DataCenterNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteDiskBackupPolicyResponse parses an HTTP response from a DeleteDiskBackupPolicyWithResponse call -func ParseDeleteDiskBackupPolicyResponse(rsp *http.Response) (*DeleteDiskBackupPolicyResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteDiskBackupPolicyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicy The disk backup policy that has been destroyed - DiskBackupPolicy DeleteDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskBackupPolicyNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDiskBackupPolicyResponse parses an HTTP response from a GetDiskBackupPolicyWithResponse call -func ParseGetDiskBackupPolicyResponse(rsp *http.Response) (*GetDiskBackupPolicyResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDiskBackupPolicyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicy The located disk backup policy - DiskBackupPolicy GetDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskBackupPolicyNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchDiskBackupPolicyResponse parses an HTTP response from a PatchDiskBackupPolicyWithResponse call -func ParsePatchDiskBackupPolicyResponse(rsp *http.Response) (*PatchDiskBackupPolicyResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchDiskBackupPolicyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicy The disk backup policy that has been updated - DiskBackupPolicy PatchDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskBackupPolicyNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteDiskBackupPolicyScheduleResponse parses an HTTP response from a DeleteDiskBackupPolicyScheduleWithResponse call -func ParseDeleteDiskBackupPolicyScheduleResponse(rsp *http.Response) (*DeleteDiskBackupPolicyScheduleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteDiskBackupPolicyScheduleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicy The disk backup policy that has been scheduled for deletion - DiskBackupPolicy DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest InvalidTimestamp400Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskBackupPolicyNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDiskTemplateVersionResponse parses an HTTP response from a GetDiskTemplateVersionWithResponse call -func ParseGetDiskTemplateVersionResponse(rsp *http.Response) (*GetDiskTemplateVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDiskTemplateVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskTemplateVersion The disk template version details - DiskTemplateVersion GetDiskTemplateVersion200ResponseDiskTemplateVersion `json:"disk_template_version"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskTemplateVersionNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDiskTemplateVersionSpecResponse parses an HTTP response from a GetDiskTemplateVersionSpecWithResponse call -func ParseGetDiskTemplateVersionSpecResponse(rsp *http.Response) (*GetDiskTemplateVersionSpecResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDiskTemplateVersionSpecResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskTemplateVersion The disk template version details - DiskTemplateVersion GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion `json:"disk_template_version"` - Spec TemplateSpec `json:"spec"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskTemplateVersionNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDiskTemplateResponse parses an HTTP response from a GetDiskTemplateWithResponse call -func ParseGetDiskTemplateResponse(rsp *http.Response) (*GetDiskTemplateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDiskTemplateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskTemplate The disk template details - DiskTemplate GetDiskTemplate200ResponseDiskTemplate `json:"disk_template"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskTemplateNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDiskTemplateVersionsResponse parses an HTTP response from a GetDiskTemplateVersionsWithResponse call -func ParseGetDiskTemplateVersionsResponse(rsp *http.Response) (*GetDiskTemplateVersionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDiskTemplateVersionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - DiskTemplate GetDiskTemplateVersions200ResponseDiskTemplate `json:"disk_template"` - - // DiskTemplateVersions The disk template versions for the provided template - DiskTemplateVersions []GetDiskTemplateVersions200ResponseDiskTemplateVersions `json:"disk_template_versions"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskTemplateNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDiskResponse parses an HTTP response from a GetDiskWithResponse call -func ParseGetDiskResponse(rsp *http.Response) (*GetDiskResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDiskResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Disk The disk details - Disk GetDisk200ResponseDisk `json:"disk"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDiskDiskBackupPoliciesResponse parses an HTTP response from a GetDiskDiskBackupPoliciesWithResponse call -func ParseGetDiskDiskBackupPoliciesResponse(rsp *http.Response) (*GetDiskDiskBackupPoliciesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDiskDiskBackupPoliciesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicies The disk backup policies for the provided disk - DiskBackupPolicies []GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostDiskDiskBackupPoliciesResponse parses an HTTP response from a PostDiskDiskBackupPoliciesWithResponse call -func ParsePostDiskDiskBackupPoliciesResponse(rsp *http.Response) (*PostDiskDiskBackupPoliciesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostDiskDiskBackupPoliciesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicy The new disk backup policy that has been created - DiskBackupPolicy PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DiskNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteDnsRecordResponse parses an HTTP response from a DeleteDnsRecordWithResponse call -func ParseDeleteDnsRecordResponse(rsp *http.Response) (*DeleteDnsRecordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteDnsRecordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Deleted bool `json:"deleted"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSRecordNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDnsRecordResponse parses an HTTP response from a GetDnsRecordWithResponse call -func ParseGetDnsRecordResponse(rsp *http.Response) (*GetDnsRecordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDnsRecordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DnsRecord The DNS record for the provided organization - DnsRecord DNSRecord `json:"dns_record"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSRecordNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchDnsRecordResponse parses an HTTP response from a PatchDnsRecordWithResponse call -func ParsePatchDnsRecordResponse(rsp *http.Response) (*PatchDnsRecordResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchDnsRecordResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DnsRecord The DNS record that has been updated - DnsRecord DNSRecord `json:"dns_record"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSRecordNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteDnsZoneResponse parses an HTTP response from a DeleteDnsZoneWithResponse call -func ParseDeleteDnsZoneResponse(rsp *http.Response) (*DeleteDnsZoneResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteDnsZoneResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Deleted bool `json:"deleted"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSZoneNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDnsZoneResponse parses an HTTP response from a GetDnsZoneWithResponse call -func ParseGetDnsZoneResponse(rsp *http.Response) (*GetDnsZoneResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDnsZoneResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DnsZone The DNS zones for the provided organization - DnsZone DNSZone `json:"dns_zone"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSZoneNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchDnsZoneResponse parses an HTTP response from a PatchDnsZoneWithResponse call -func ParsePatchDnsZoneResponse(rsp *http.Response) (*PatchDnsZoneResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchDnsZoneResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DnsZone The DNS zones for the provided organization - DnsZone DNSZone `json:"dns_zone"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSZoneNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetDnsZoneRecordsResponse parses an HTTP response from a GetDnsZoneRecordsWithResponse call -func ParseGetDnsZoneRecordsResponse(rsp *http.Response) (*GetDnsZoneRecordsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetDnsZoneRecordsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DnsRecords The DNS record for the provided zone - DnsRecords []DNSRecord `json:"dns_records"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSZoneNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostDnsZoneRecordsResponse parses an HTTP response from a PostDnsZoneRecordsWithResponse call -func ParsePostDnsZoneRecordsResponse(rsp *http.Response) (*PostDnsZoneRecordsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostDnsZoneRecordsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - DnsRecord DNSRecord `json:"dns_record"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSZoneNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostDnsZoneVerifyResponse parses an HTTP response from a PostDnsZoneVerifyWithResponse call -func ParsePostDnsZoneVerifyResponse(rsp *http.Response) (*PostDnsZoneVerifyResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostDnsZoneVerifyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DnsZone The DNS zones for the provided organization - DnsZone DNSZone `json:"dns_zone"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DNSZoneNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest DNSZoneNotVerifiedResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteFileStorageVolumeResponse parses an HTTP response from a DeleteFileStorageVolumeWithResponse call -func ParseDeleteFileStorageVolumeResponse(rsp *http.Response) (*DeleteFileStorageVolumeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteFileStorageVolumeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // FileStorageVolume The file storage volume that has been destroyed. - FileStorageVolume DeleteFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` - TrashObject TrashObject `json:"trash_object"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest FileStorageVolumeNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetFileStorageVolumeResponse parses an HTTP response from a GetFileStorageVolumeWithResponse call -func ParseGetFileStorageVolumeResponse(rsp *http.Response) (*GetFileStorageVolumeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetFileStorageVolumeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // FileStorageVolume The file storage volume. - FileStorageVolume GetFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest FileStorageVolumeNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchFileStorageVolumeResponse parses an HTTP response from a PatchFileStorageVolumeWithResponse call -func ParsePatchFileStorageVolumeResponse(rsp *http.Response) (*PatchFileStorageVolumeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchFileStorageVolumeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // FileStorageVolume The file storage volume. - FileStorageVolume PatchFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest FileStorageVolumeNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetGpuTypesResponse parses an HTTP response from a GetGpuTypesWithResponse call -func ParseGetGpuTypesResponse(rsp *http.Response) (*GetGpuTypesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetGpuTypesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - GpuTypes []GetGPUTypes200ResponseGPUTypes `json:"gpu_types"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetGpuTypeResponse parses an HTTP response from a GetGpuTypeWithResponse call -func ParseGetGpuTypeResponse(rsp *http.Response) (*GetGpuTypeResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetGpuTypeResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - GpuType GetGPUType200ResponseGPUType `json:"gpu_type"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest GPUTypeNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostInvalidateLinkedWebSessionResponse parses an HTTP response from a PostInvalidateLinkedWebSessionWithResponse call -func ParsePostInvalidateLinkedWebSessionResponse(rsp *http.Response) (*PostInvalidateLinkedWebSessionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostInvalidateLinkedWebSessionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Status bool `json:"status"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest IdentityNotLinkedToWebSession400Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteIpAddressResponse parses an HTTP response from a DeleteIpAddressWithResponse call -func ParseDeleteIpAddressResponse(rsp *http.Response) (*DeleteIpAddressResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteIpAddressResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest interface{} - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest IPAddressNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest ResourceDoesNotSupportUnallocationResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetIpAddressResponse parses an HTTP response from a GetIpAddressWithResponse call -func ParseGetIpAddressResponse(rsp *http.Response) (*GetIpAddressResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetIpAddressResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Allocation The resource this address is allocated to - Allocation *GetIPAddress200ResponseAllocation `json:"allocation"` - - // IpAddress The IP address that has been located - IpAddress IPAddress `json:"ip_address"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest IPAddressNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchIpAddressResponse parses an HTTP response from a PatchIpAddressWithResponse call -func ParsePatchIpAddressResponse(rsp *http.Response) (*PatchIpAddressResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchIpAddressResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // IpAddress The IP address that has been updated - IpAddress IPAddress `json:"ip_address"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest IPAddressNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostIpAddressUnallocateResponse parses an HTTP response from a PostIpAddressUnallocateWithResponse call -func ParsePostIpAddressUnallocateResponse(rsp *http.Response) (*PostIpAddressUnallocateResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostIpAddressUnallocateResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest interface{} - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest IPAddressNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest ResourceDoesNotSupportUnallocationResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest NoAllocationResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteLoadBalancerResponse parses an HTTP response from a DeleteLoadBalancerWithResponse call -func ParseDeleteLoadBalancerResponse(rsp *http.Response) (*DeleteLoadBalancerResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteLoadBalancerResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancer The load balancer that has been destroyed - LoadBalancer DeleteLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetLoadBalancerResponse parses an HTTP response from a GetLoadBalancerWithResponse call -func ParseGetLoadBalancerResponse(rsp *http.Response) (*GetLoadBalancerResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetLoadBalancerResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancer The load balancer - LoadBalancer GetLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchLoadBalancerResponse parses an HTTP response from a PatchLoadBalancerWithResponse call -func ParsePatchLoadBalancerResponse(rsp *http.Response) (*PatchLoadBalancerResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchLoadBalancerResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancer The load balancer that has been updated - LoadBalancer PatchLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetLoadBalancerRulesResponse parses an HTTP response from a GetLoadBalancerRulesWithResponse call -func ParseGetLoadBalancerRulesResponse(rsp *http.Response) (*GetLoadBalancerRulesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetLoadBalancerRulesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancerRules The load balancer rules for this load balancer - LoadBalancerRules []GetLoadBalancerRules200ResponseLoadBalancerRules `json:"load_balancer_rules"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostLoadBalancerRulesResponse parses an HTTP response from a PostLoadBalancerRulesWithResponse call -func ParsePostLoadBalancerRulesResponse(rsp *http.Response) (*PostLoadBalancerRulesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostLoadBalancerRulesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancerRule The load balancer rule that has been created - LoadBalancerRule PostLoadBalancerRules200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse parses an HTTP response from a DeleteLoadBalancersRulesLoadBalancerRuleWithResponse call -func ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse(rsp *http.Response) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteLoadBalancersRulesLoadBalancerRuleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancerRule The load balancer rule that has been destroyed - LoadBalancerRule DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerRuleNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetLoadBalancersRulesLoadBalancerRuleResponse parses an HTTP response from a GetLoadBalancersRulesLoadBalancerRuleWithResponse call -func ParseGetLoadBalancersRulesLoadBalancerRuleResponse(rsp *http.Response) (*GetLoadBalancersRulesLoadBalancerRuleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetLoadBalancersRulesLoadBalancerRuleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancerRule The resolved load balancer rule - LoadBalancerRule GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerRuleNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchLoadBalancersRulesLoadBalancerRuleResponse parses an HTTP response from a PatchLoadBalancersRulesLoadBalancerRuleWithResponse call -func ParsePatchLoadBalancersRulesLoadBalancerRuleResponse(rsp *http.Response) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchLoadBalancersRulesLoadBalancerRuleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancerRule The load balancer that has been updated - LoadBalancerRule PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest LoadBalancerRuleNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetNetworkResponse parses an HTTP response from a GetNetworkWithResponse call -func ParseGetNetworkResponse(rsp *http.Response) (*GetNetworkResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetNetworkResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Network The details for the requested network - Network Network `json:"network"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NetworkNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOperatingSystemsResponse parses an HTTP response from a GetOperatingSystemsWithResponse call -func ParseGetOperatingSystemsResponse(rsp *http.Response) (*GetOperatingSystemsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOperatingSystemsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // OperatingSystems The list of available operating systems - OperatingSystems []GetOperatingSystems200ResponseOperatingSystems `json:"operating_systems"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOperatingSystemResponse parses an HTTP response from a GetOperatingSystemWithResponse call -func ParseGetOperatingSystemResponse(rsp *http.Response) (*GetOperatingSystemResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOperatingSystemResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // OperatingSystem The operating system details - OperatingSystem OperatingSystem `json:"operating_system"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OperatingSystemNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call -func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Organizations []GetOrganizations200ResponseOrganizations `json:"organizations"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationResponse parses an HTTP response from a GetOrganizationWithResponse call -func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Organization Organization `json:"organization"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationAvailableNetworksResponse parses an HTTP response from a GetOrganizationAvailableNetworksWithResponse call -func ParseGetOrganizationAvailableNetworksResponse(rsp *http.Response) (*GetOrganizationAvailableNetworksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationAvailableNetworksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Networks []GetOrganizationAvailableNetworks200ResponseNetworks `json:"networks"` - VirtualNetworks []GetOrganizationAvailableNetworks200ResponseVirtualNetworks `json:"virtual_networks"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationCertificatesResponse parses an HTTP response from a GetOrganizationCertificatesWithResponse call -func ParseGetOrganizationCertificatesResponse(rsp *http.Response) (*GetOrganizationCertificatesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationCertificatesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Certificates []GetOrganizationCertificates200ResponseCertificates `json:"certificates"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationDiskBackupPoliciesResponse parses an HTTP response from a GetOrganizationDiskBackupPoliciesWithResponse call -func ParseGetOrganizationDiskBackupPoliciesResponse(rsp *http.Response) (*GetOrganizationDiskBackupPoliciesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationDiskBackupPoliciesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicies The disk backup policies for the provided organization - DiskBackupPolicies []GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationDiskTemplatesResponse parses an HTTP response from a GetOrganizationDiskTemplatesWithResponse call -func ParseGetOrganizationDiskTemplatesResponse(rsp *http.Response) (*GetOrganizationDiskTemplatesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationDiskTemplatesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskTemplates The list of disk templates - DiskTemplates []GetOrganizationDiskTemplates200ResponseDiskTemplates `json:"disk_templates"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OperatingSystemNotFoundOrganizationNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationDisksResponse parses an HTTP response from a GetOrganizationDisksWithResponse call -func ParseGetOrganizationDisksResponse(rsp *http.Response) (*GetOrganizationDisksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationDisksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Disk The list of disks - Disk []GetOrganizationDisks200ResponseDisk `json:"disk"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationDnsZonesResponse parses an HTTP response from a GetOrganizationDnsZonesWithResponse call -func ParseGetOrganizationDnsZonesResponse(rsp *http.Response) (*GetOrganizationDnsZonesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationDnsZonesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DnsZones The DNS zones for the provided organization - DnsZones []DNSZone `json:"dns_zones"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationDnsZonesResponse parses an HTTP response from a PostOrganizationDnsZonesWithResponse call -func ParsePostOrganizationDnsZonesResponse(rsp *http.Response) (*PostOrganizationDnsZonesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationDnsZonesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - // DnsZone The new DNS zone that has been created - DnsZone DNSZone `json:"dns_zone"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationDnsZonesNameserversResponse parses an HTTP response from a GetOrganizationDnsZonesNameserversWithResponse call -func ParseGetOrganizationDnsZonesNameserversResponse(rsp *http.Response) (*GetOrganizationDnsZonesNameserversResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationDnsZonesNameserversResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Nameservers []string `json:"nameservers"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationFileStorageVolumesResponse parses an HTTP response from a GetOrganizationFileStorageVolumesWithResponse call -func ParseGetOrganizationFileStorageVolumesResponse(rsp *http.Response) (*GetOrganizationFileStorageVolumesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationFileStorageVolumesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // FileStorageVolumes A list of all file storage volumes for the given organization. - FileStorageVolumes []GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes `json:"file_storage_volumes"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationFileStorageVolumesResponse parses an HTTP response from a PostOrganizationFileStorageVolumesWithResponse call -func ParsePostOrganizationFileStorageVolumesResponse(rsp *http.Response) (*PostOrganizationFileStorageVolumesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationFileStorageVolumesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - // FileStorageVolume The file storage volume. - FileStorageVolume PostOrganizationFileStorageVolumes201ResponseFileStorageVolume `json:"file_storage_volume"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationIpAddressesResponse parses an HTTP response from a GetOrganizationIpAddressesWithResponse call -func ParseGetOrganizationIpAddressesResponse(rsp *http.Response) (*GetOrganizationIpAddressesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationIpAddressesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // IpAddresses The IP addresses belonging to this organization - IpAddresses []GetOrganizationIPAddresses200ResponseIPAddresses `json:"ip_addresses"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationIpAddressesResponse parses an HTTP response from a PostOrganizationIpAddressesWithResponse call -func ParsePostOrganizationIpAddressesResponse(rsp *http.Response) (*PostOrganizationIpAddressesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationIpAddressesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // IpAddress The newly allocated IP address - IpAddress IPAddress `json:"ip_address"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NetworkNotFoundOrganizationNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest NoAvailableAddressesResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON503 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationLoadBalancersResponse parses an HTTP response from a GetOrganizationLoadBalancersWithResponse call -func ParseGetOrganizationLoadBalancersResponse(rsp *http.Response) (*GetOrganizationLoadBalancersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationLoadBalancersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancers The load balancers owned by this organization - LoadBalancers []GetOrganizationLoadBalancers200ResponseLoadBalancers `json:"load_balancers"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationLoadBalancersResponse parses an HTTP response from a PostOrganizationLoadBalancersWithResponse call -func ParsePostOrganizationLoadBalancersResponse(rsp *http.Response) (*PostOrganizationLoadBalancersResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationLoadBalancersResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // LoadBalancer The load balancer that has been created - LoadBalancer PostOrganizationLoadBalancers200ResponseLoadBalancer `json:"load_balancer"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationManagedResponse parses an HTTP response from a GetOrganizationManagedWithResponse call -func ParseGetOrganizationManagedResponse(rsp *http.Response) (*GetOrganizationManagedResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationManagedResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Organizations []GetOrganizationManaged200ResponseOrganizations `json:"organizations"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationManagedResponse parses an HTTP response from a PostOrganizationManagedWithResponse call -func ParsePostOrganizationManagedResponse(rsp *http.Response) (*PostOrganizationManagedResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationManagedResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - Organization Organization `json:"organization"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest OrganizationLimitReachedValidationError422Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationNetworkSpeedProfilesResponse parses an HTTP response from a GetOrganizationNetworkSpeedProfilesWithResponse call -func ParseGetOrganizationNetworkSpeedProfilesResponse(rsp *http.Response) (*GetOrganizationNetworkSpeedProfilesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationNetworkSpeedProfilesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // NetworkSpeedProfiles The network speed profiles available to this organization - NetworkSpeedProfiles []NetworkSpeedProfile `json:"network_speed_profiles"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationSecurityGroupsResponse parses an HTTP response from a GetOrganizationSecurityGroupsWithResponse call -func ParseGetOrganizationSecurityGroupsResponse(rsp *http.Response) (*GetOrganizationSecurityGroupsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationSecurityGroupsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - - // SecurityGroups The security groups owned by this organization - SecurityGroups []SecurityGroup `json:"security_groups"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationSecurityGroupsResponse parses an HTTP response from a PostOrganizationSecurityGroupsWithResponse call -func ParsePostOrganizationSecurityGroupsResponse(rsp *http.Response) (*PostOrganizationSecurityGroupsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationSecurityGroupsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroup The security group that has been created - SecurityGroup SecurityGroup `json:"security_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationSshKeysResponse parses an HTTP response from a GetOrganizationSshKeysWithResponse call -func ParseGetOrganizationSshKeysResponse(rsp *http.Response) (*GetOrganizationSshKeysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationSshKeysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - SshKeys []AuthSSHKey `json:"ssh_keys"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationSshKeysResponse parses an HTTP response from a PostOrganizationSshKeysWithResponse call -func ParsePostOrganizationSshKeysResponse(rsp *http.Response) (*PostOrganizationSshKeysResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationSshKeysResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - SshKey AuthSSHKey `json:"ssh_key"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationTagsResponse parses an HTTP response from a GetOrganizationTagsWithResponse call -func ParseGetOrganizationTagsResponse(rsp *http.Response) (*GetOrganizationTagsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationTagsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - - // Tags The details for the tags on the organization - Tags []GetOrganizationTags200ResponseTags `json:"tags"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationTagsResponse parses an HTTP response from a PostOrganizationTagsWithResponse call -func ParsePostOrganizationTagsResponse(rsp *http.Response) (*PostOrganizationTagsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationTagsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Tag The newly created tag - Tag Tag `json:"tag"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationTrashObjectsResponse parses an HTTP response from a GetOrganizationTrashObjectsWithResponse call -func ParseGetOrganizationTrashObjectsResponse(rsp *http.Response) (*GetOrganizationTrashObjectsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationTrashObjectsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - - // TrashObjects The trash objects that belong to this organization - TrashObjects []TrashObject `json:"trash_objects"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationTrashObjectsPurgeAllResponse parses an HTTP response from a PostOrganizationTrashObjectsPurgeAllWithResponse call -func ParsePostOrganizationTrashObjectsPurgeAllResponse(rsp *http.Response) (*PostOrganizationTrashObjectsPurgeAllResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationTrashObjectsPurgeAllResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task Task `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest TaskQueueingErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationUsersWithAccessResponse parses an HTTP response from a GetOrganizationUsersWithAccessWithResponse call -func ParseGetOrganizationUsersWithAccessResponse(rsp *http.Response) (*GetOrganizationUsersWithAccessResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationUsersWithAccessResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - Users []GetOrganizationUsersWithAccess200ResponseUsers `json:"users"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationVirtualMachineGroupsResponse parses an HTTP response from a GetOrganizationVirtualMachineGroupsWithResponse call -func ParseGetOrganizationVirtualMachineGroupsResponse(rsp *http.Response) (*GetOrganizationVirtualMachineGroupsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationVirtualMachineGroupsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineGroups The virtual machine groups for the provided organization - VirtualMachineGroups []VirtualMachineGroup `json:"virtual_machine_groups"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationVirtualMachineGroupsResponse parses an HTTP response from a PostOrganizationVirtualMachineGroupsWithResponse call -func ParsePostOrganizationVirtualMachineGroupsResponse(rsp *http.Response) (*PostOrganizationVirtualMachineGroupsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationVirtualMachineGroupsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineGroup The new virtual machine group details - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetOrganizationVirtualMachinesResponse parses an HTTP response from a GetOrganizationVirtualMachinesWithResponse call -func ParseGetOrganizationVirtualMachinesResponse(rsp *http.Response) (*GetOrganizationVirtualMachinesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetOrganizationVirtualMachinesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - VirtualMachines []GetOrganizationVirtualMachines200ResponseVirtualMachines `json:"virtual_machines"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationVirtualMachinesBuildResponse parses an HTTP response from a PostOrganizationVirtualMachinesBuildWithResponse call -func ParsePostOrganizationVirtualMachinesBuildResponse(rsp *http.Response) (*PostOrganizationVirtualMachinesBuildResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationVirtualMachinesBuildResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - // Build Deprecated, please use "virtual_machine_build" instead - Build PostOrganizationVirtualMachinesBuild201ResponseBuild `json:"build"` - Hostname string `json:"hostname"` - Task PostOrganizationVirtualMachinesBuild201ResponseTask `json:"task"` - VirtualMachineBuild PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild `json:"virtual_machine_build"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest LocationRequiredValidationError422Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostOrganizationVirtualMachinesBuildFromSpecResponse parses an HTTP response from a PostOrganizationVirtualMachinesBuildFromSpecWithResponse call -func ParsePostOrganizationVirtualMachinesBuildFromSpecResponse(rsp *http.Response) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostOrganizationVirtualMachinesBuildFromSpecResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - // Build Deprecated, please use "virtual_machine_build" instead - Build PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild `json:"build"` - Hostname string `json:"hostname"` - Task PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask `json:"task"` - VirtualMachineBuild PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild `json:"virtual_machine_build"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest InvalidSpecXML400Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteSecurityGroupResponse parses an HTTP response from a DeleteSecurityGroupWithResponse call -func ParseDeleteSecurityGroupResponse(rsp *http.Response) (*DeleteSecurityGroupResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteSecurityGroupResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroup The security group that has been destroyed - SecurityGroup DeleteSecurityGroup200ResponseSecurityGroup `json:"security_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest DeletionRestrictedResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetSecurityGroupResponse parses an HTTP response from a GetSecurityGroupWithResponse call -func ParseGetSecurityGroupResponse(rsp *http.Response) (*GetSecurityGroupResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSecurityGroupResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroup The security group - SecurityGroup SecurityGroup `json:"security_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchSecurityGroupResponse parses an HTTP response from a PatchSecurityGroupWithResponse call -func ParsePatchSecurityGroupResponse(rsp *http.Response) (*PatchSecurityGroupResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchSecurityGroupResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroup The security group that has been updated - SecurityGroup SecurityGroup `json:"security_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetSecurityGroupRulesResponse parses an HTTP response from a GetSecurityGroupRulesWithResponse call -func ParseGetSecurityGroupRulesResponse(rsp *http.Response) (*GetSecurityGroupRulesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSecurityGroupRulesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - - // SecurityGroupRules The security group rules for this security group - SecurityGroupRules []GetSecurityGroupRules200ResponseSecurityGroupRules `json:"security_group_rules"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostSecurityGroupRulesResponse parses an HTTP response from a PostSecurityGroupRulesWithResponse call -func ParsePostSecurityGroupRulesResponse(rsp *http.Response) (*PostSecurityGroupRulesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostSecurityGroupRulesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroupRule The security group rule that has been created - SecurityGroupRule PostSecurityGroupRules200ResponseSecurityGroupRule `json:"security_group_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse parses an HTTP response from a DeleteSecurityGroupsRulesSecurityGroupRuleWithResponse call -func ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse(rsp *http.Response) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteSecurityGroupsRulesSecurityGroupRuleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroupRule The security group rule that has been destroyed - SecurityGroupRule DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupRuleNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetSecurityGroupsRulesSecurityGroupRuleResponse parses an HTTP response from a GetSecurityGroupsRulesSecurityGroupRuleWithResponse call -func ParseGetSecurityGroupsRulesSecurityGroupRuleResponse(rsp *http.Response) (*GetSecurityGroupsRulesSecurityGroupRuleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetSecurityGroupsRulesSecurityGroupRuleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroupRule The resolved security group rule - SecurityGroupRule GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupRuleNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse parses an HTTP response from a PatchSecurityGroupsRulesSecurityGroupRuleWithResponse call -func ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse(rsp *http.Response) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchSecurityGroupsRulesSecurityGroupRuleResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // SecurityGroupRule The security group that has been updated - SecurityGroupRule PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SecurityGroupRuleNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteSshKeyResponse parses an HTTP response from a DeleteSshKeyWithResponse call -func ParseDeleteSshKeyResponse(rsp *http.Response) (*DeleteSshKeyResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteSshKeyResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - SshKey AuthSSHKey `json:"ssh_key"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest SSHKeyNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest DeletionRestrictedResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteTagResponse parses an HTTP response from a DeleteTagWithResponse call -func ParseDeleteTagResponse(rsp *http.Response) (*DeleteTagResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteTagResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Tag The newly deleted tag - Tag Tag `json:"tag"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest TagNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetTagResponse parses an HTTP response from a GetTagWithResponse call -func ParseGetTagResponse(rsp *http.Response) (*GetTagResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetTagResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Tag The details for the requested tag - Tag Tag `json:"tag"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest TagNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchTagResponse parses an HTTP response from a PatchTagWithResponse call -func ParsePatchTagResponse(rsp *http.Response) (*PatchTagResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchTagResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Tag The newly updated tag - Tag Tag `json:"tag"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest TagNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetTaskResponse parses an HTTP response from a GetTaskWithResponse call -func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetTaskResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task Task `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest TaskNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteTrashObjectResponse parses an HTTP response from a DeleteTrashObjectWithResponse call -func ParseDeleteTrashObjectResponse(rsp *http.Response) (*DeleteTrashObjectResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteTrashObjectResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task Task `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest TrashObjectNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest TaskQueueingErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetTrashObjectResponse parses an HTTP response from a GetTrashObjectWithResponse call -func ParseGetTrashObjectResponse(rsp *http.Response) (*GetTrashObjectResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetTrashObjectResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // TrashObject The requested trash object - TrashObject TrashObject `json:"trash_object"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest TrashObjectNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostTrashObjectRestoreResponse parses an HTTP response from a PostTrashObjectRestoreWithResponse call -func ParsePostTrashObjectRestoreResponse(rsp *http.Response) (*PostTrashObjectRestoreResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostTrashObjectRestoreResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // TrashObject The requested trash object - TrashObject TrashObject `json:"trash_object"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest TrashObjectNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetUsersCurrentResponse parses an HTTP response from a GetUsersCurrentWithResponse call -func ParseGetUsersCurrentResponse(rsp *http.Response) (*GetUsersCurrentResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetUsersCurrentResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - ApiTokenId string `json:"api_token_id"` - Organizations []GetUsersCurrent200ResponseOrganizations `json:"organizations"` - User User `json:"user"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NoUserAssociatedWithIdentityResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteVirtualMachineGroupResponse parses an HTTP response from a DeleteVirtualMachineGroupWithResponse call -func ParseDeleteVirtualMachineGroupResponse(rsp *http.Response) (*DeleteVirtualMachineGroupResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteVirtualMachineGroupResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineGroup The details for the deleted virtual machine group - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: - var dest DeletionRestrictedResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON409 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachineGroupResponse parses an HTTP response from a GetVirtualMachineGroupWithResponse call -func ParseGetVirtualMachineGroupResponse(rsp *http.Response) (*GetVirtualMachineGroupResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachineGroupResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineGroup The virtual machine group details - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchVirtualMachineGroupResponse parses an HTTP response from a PatchVirtualMachineGroupWithResponse call -func ParsePatchVirtualMachineGroupResponse(rsp *http.Response) (*PatchVirtualMachineGroupResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchVirtualMachineGroupResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineGroup The updated virtual machine group details - VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineGroupNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVMNIVMNIResponse parses an HTTP response from a GetVMNIVMNIWithResponse call -func ParseGetVMNIVMNIResponse(rsp *http.Response) (*GetVMNIVMNIResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVMNIVMNIResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineNetworkInterface The network interface details - VirtualMachineNetworkInterface GetVMNIVMNI200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNetworkInterfaceNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse parses an HTTP response from a PostVirtualMachineNetworkInterfaceAllocateIpWithResponse call -func ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse(rsp *http.Response) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineNetworkInterfaceAllocateIpResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineNetworkInterface The network interface details - VirtualMachineNetworkInterface PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest IPAlreadyAllocatedInvalidIP422Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse parses an HTTP response from a PostVirtualMachineNetworkInterfaceAllocateNewIpWithResponse call -func ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse(rsp *http.Response) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineNetworkInterfaceAllocateNewIpResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // IpAddress The newly allocated IP address - IpAddress IPAddress `json:"ip_address"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNetworkInterfaceNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: - var dest NoAvailableAddressesResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON503 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse parses an HTTP response from a GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse call -func ParseGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse(rsp *http.Response) (*GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // IpAddresses The IP addresses available for this network interface - IpAddresses []IPAddress `json:"ip_addresses"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNetworkInterfaceNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse parses an HTTP response from a PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithResponse call -func ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse(rsp *http.Response) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Task The task responsible for updating the virtual machine network interface speed profile - Task Task `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest TaskQueueingErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest SpeedProfileAlreadyAssignedResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachinePackagesResponse parses an HTTP response from a GetVirtualMachinePackagesWithResponse call -func ParseGetVirtualMachinePackagesResponse(rsp *http.Response) (*GetVirtualMachinePackagesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachinePackagesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - VirtualMachinePackages []GetVirtualMachinePackages200ResponseVirtualMachinePackages `json:"virtual_machine_packages"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest OrganizationNotActivatedOrganizationSuspended403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest OrganizationNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachinePackageResponse parses an HTTP response from a GetVirtualMachinePackageWithResponse call -func ParseGetVirtualMachinePackageResponse(rsp *http.Response) (*GetVirtualMachinePackageResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachinePackageResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - VirtualMachinePackage VirtualMachinePackage `json:"virtual_machine_package"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachinePackageNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseDeleteVirtualMachineResponse parses an HTTP response from a DeleteVirtualMachineWithResponse call -func ParseDeleteVirtualMachineResponse(rsp *http.Response) (*DeleteVirtualMachineResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &DeleteVirtualMachineResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - TrashObject TrashObject `json:"trash_object"` - VirtualMachine DeleteVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachineResponse parses an HTTP response from a GetVirtualMachineWithResponse call -func ParseGetVirtualMachineResponse(rsp *http.Response) (*GetVirtualMachineResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachineResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - VirtualMachine GetVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePatchVirtualMachineResponse parses an HTTP response from a PatchVirtualMachineWithResponse call -func ParsePatchVirtualMachineResponse(rsp *http.Response) (*PatchVirtualMachineResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PatchVirtualMachineResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachine The newly updated virtual machine - VirtualMachine PatchVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineAllocateIpResponse parses an HTTP response from a PostVirtualMachineAllocateIpWithResponse call -func ParsePostVirtualMachineAllocateIpResponse(rsp *http.Response) (*PostVirtualMachineAllocateIpResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineAllocateIpResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // IpAddress The newly allocated IP address - IpAddress IPAddress `json:"ip_address"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest IPAddressNotFoundVirtualMachineNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest IPAlreadyAllocatedNoInterfaceAvailable422Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineConsoleSessionsResponse parses an HTTP response from a PostVirtualMachineConsoleSessionsWithResponse call -func ParsePostVirtualMachineConsoleSessionsResponse(rsp *http.Response) (*PostVirtualMachineConsoleSessionsResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineConsoleSessionsResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest struct { - ConsoleSession PostVirtualMachineConsoleSessions201ResponseConsoleSession `json:"console_session"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON201 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashVirtualMachineMustBeStarted406Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachineDiskBackupPoliciesResponse parses an HTTP response from a GetVirtualMachineDiskBackupPoliciesWithResponse call -func ParseGetVirtualMachineDiskBackupPoliciesResponse(rsp *http.Response) (*GetVirtualMachineDiskBackupPoliciesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachineDiskBackupPoliciesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicies The disk backup policies for the provided virtual machine - DiskBackupPolicies []GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineDiskBackupPoliciesResponse parses an HTTP response from a PostVirtualMachineDiskBackupPoliciesWithResponse call -func ParsePostVirtualMachineDiskBackupPoliciesResponse(rsp *http.Response) (*PostVirtualMachineDiskBackupPoliciesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineDiskBackupPoliciesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // DiskBackupPolicy The new disk backup policy that has been created - DiskBackupPolicy PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: - var dest ValidationErrorResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON422 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachineDisksResponse parses an HTTP response from a GetVirtualMachineDisksWithResponse call -func ParseGetVirtualMachineDisksResponse(rsp *http.Response) (*GetVirtualMachineDisksResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachineDisksResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Disks The list of disks - Disks []GetVirtualMachineDisks200ResponseDisks `json:"disks"` - Pagination PaginationObject `json:"pagination"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePutVirtualMachineFlexibleResourcesResponse parses an HTTP response from a PutVirtualMachineFlexibleResourcesWithResponse call -func ParsePutVirtualMachineFlexibleResourcesResponse(rsp *http.Response) (*PutVirtualMachineFlexibleResourcesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PutVirtualMachineFlexibleResourcesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task Task `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashTaskQueueingError406Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachineNetworkInterfacesResponse parses an HTTP response from a GetVirtualMachineNetworkInterfacesWithResponse call -func ParseGetVirtualMachineNetworkInterfacesResponse(rsp *http.Response) (*GetVirtualMachineNetworkInterfacesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachineNetworkInterfacesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Pagination PaginationObject `json:"pagination"` - - // VirtualMachineNetworkInterfaces The network interfaces for this virtual machine - VirtualMachineNetworkInterfaces []GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces `json:"virtual_machine_network_interfaces"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachineNetworkInterfaceResponse parses an HTTP response from a GetVirtualMachineNetworkInterfaceWithResponse call -func ParseGetVirtualMachineNetworkInterfaceResponse(rsp *http.Response) (*GetVirtualMachineNetworkInterfaceResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachineNetworkInterfaceResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // VirtualMachineNetworkInterface The network interface details - VirtualMachineNetworkInterface GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePutVirtualMachinePackageResponse parses an HTTP response from a PutVirtualMachinePackageWithResponse call -func ParsePutVirtualMachinePackageResponse(rsp *http.Response) (*PutVirtualMachinePackageResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PutVirtualMachinePackageResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task Task `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundVirtualMachinePackageNotFound404Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashTaskQueueingError406Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineResetResponse parses an HTTP response from a PostVirtualMachineResetWithResponse call -func ParsePostVirtualMachineResetResponse(rsp *http.Response) (*PostVirtualMachineResetResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineResetResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task PostVirtualMachineReset200ResponseTask `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashTaskQueueingError406Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineShutdownResponse parses an HTTP response from a PostVirtualMachineShutdownWithResponse call -func ParsePostVirtualMachineShutdownResponse(rsp *http.Response) (*PostVirtualMachineShutdownResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineShutdownResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task PostVirtualMachineShutdown200ResponseTask `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashTaskQueueingError406Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineStartResponse parses an HTTP response from a PostVirtualMachineStartWithResponse call -func ParsePostVirtualMachineStartResponse(rsp *http.Response) (*PostVirtualMachineStartResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineStartResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task PostVirtualMachineStart200ResponseTask `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashTaskQueueingError406Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParsePostVirtualMachineStopResponse parses an HTTP response from a PostVirtualMachineStopWithResponse call -func ParsePostVirtualMachineStopResponse(rsp *http.Response) (*PostVirtualMachineStopResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &PostVirtualMachineStopResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - Task PostVirtualMachineStop200ResponseTask `json:"task"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest PermissionDenied403Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: - var dest ObjectInTrashTaskQueueingError406Res - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON406 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil -} - -// ParseGetVirtualMachinesBuildsVirtualMachineBuildResponse parses an HTTP response from a GetVirtualMachinesBuildsVirtualMachineBuildWithResponse call -func ParseGetVirtualMachinesBuildsVirtualMachineBuildResponse(rsp *http.Response) (*GetVirtualMachinesBuildsVirtualMachineBuildResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() - if err != nil { - return nil, err - } - - response := &GetVirtualMachinesBuildsVirtualMachineBuildResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - VirtualMachineBuild GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild `json:"virtual_machine_build"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest VirtualMachineBuildNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - - } - - return response, nil +type Client struct { + Core core.ClientInterface + Public public.ClientInterface } -// ParseGetZonesResponse parses an HTTP response from a GetZonesWithResponse call -func ParseGetZonesResponse(rsp *http.Response) (*GetZonesResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() +func NewClient( + coreURL string, + coreToken string, + coreHTTPClient core.HttpRequestDoer, + publicURL string, + publicToken string, + publicHTTPClient public.HttpRequestDoer, +) (*Client, error) { + coreClient, err := core.NewClientWithResponses( + coreURL, + coreToken, + core.WithHTTPClient(coreHTTPClient), + ) if err != nil { - return nil, err - } - - response := &GetZonesResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Zones The zones available to the current identity - Zones []GetZones200ResponseZones `json:"zones"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - + return nil, fmt.Errorf("error creating core client: %w", err) } - return response, nil -} - -// ParseGetZoneResponse parses an HTTP response from a GetZoneWithResponse call -func ParseGetZoneResponse(rsp *http.Response) (*GetZoneResponse, error) { - bodyBytes, err := io.ReadAll(rsp.Body) - defer func() { _ = rsp.Body.Close() }() + publicClient, err := public.NewClientWithResponses( + publicURL, + publicToken, + public.WithHTTPClient(publicHTTPClient), + ) if err != nil { - return nil, err - } - - response := &GetZoneResponse{ - Body: bodyBytes, - HTTPResponse: rsp, - } - - switch { - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest struct { - // Zone The zone details - Zone Zone `json:"zone"` - } - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON200 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: - var dest APIAuthenticator400Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON400 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: - var dest APIAuthenticator403Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON403 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: - var dest ZoneNotFoundResponse - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON404 = &dest - - case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: - var dest APIAuthenticator429Response - if err := json.Unmarshal(bodyBytes, &dest); err != nil { - return nil, err - } - response.JSON429 = &dest - + return nil, fmt.Errorf("error creating public client: %w", err) } - return response, nil + return &Client{ + Core: coreClient, + Public: publicClient, + }, nil } diff --git a/next/core/core.go b/next/core/core.go new file mode 100644 index 0000000..0bc954f --- /dev/null +++ b/next/core/core.go @@ -0,0 +1,34236 @@ +// Package core provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT. +package core + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/deepmap/oapi-codegen/v2/pkg/securityprovider" + "github.com/oapi-codegen/runtime" +) + +const ( + AuthenticatorScopes = "Authenticator.Scopes" +) + +// Defines values for AddressListEntryNotFoundEnum. +const ( + AddressListEntryNotFound AddressListEntryNotFoundEnum = "address_list_entry_not_found" +) + +// Defines values for AddressListNotFoundEnum. +const ( + AddressListNotFound AddressListNotFoundEnum = "address_list_not_found" +) + +// Defines values for CertificateNotFoundEnum. +const ( + CertificateNotFound CertificateNotFoundEnum = "certificate_not_found" +) + +// Defines values for CertificateStateEnum. +const ( + CertificateStateEnumIssueFailed CertificateStateEnum = "issue_failed" + CertificateStateEnumIssued CertificateStateEnum = "issued" + CertificateStateEnumIssuing CertificateStateEnum = "issuing" + CertificateStateEnumPending CertificateStateEnum = "pending" +) + +// Defines values for CountryNotFoundEnum. +const ( + CountryNotFound CountryNotFoundEnum = "country_not_found" +) + +// Defines values for CountryStateNotFoundEnum. +const ( + CountryStateNotFound CountryStateNotFoundEnum = "country_state_not_found" +) + +// Defines values for CurrencyNotFoundEnum. +const ( + CurrencyNotFound CurrencyNotFoundEnum = "currency_not_found" +) + +// Defines values for DNSRecordNotFoundEnum. +const ( + DnsRecordNotFound DNSRecordNotFoundEnum = "dns_record_not_found" +) + +// Defines values for DNSRecordTypesEnum. +const ( + DNSRecordTypesEnumA DNSRecordTypesEnum = "A" + DNSRecordTypesEnumAAAA DNSRecordTypesEnum = "AAAA" + DNSRecordTypesEnumALIAS DNSRecordTypesEnum = "ALIAS" + DNSRecordTypesEnumCAA DNSRecordTypesEnum = "CAA" + DNSRecordTypesEnumCNAME DNSRecordTypesEnum = "CNAME" + DNSRecordTypesEnumIPS DNSRecordTypesEnum = "IPS" + DNSRecordTypesEnumMX DNSRecordTypesEnum = "MX" + DNSRecordTypesEnumNS DNSRecordTypesEnum = "NS" + DNSRecordTypesEnumPTR DNSRecordTypesEnum = "PTR" + DNSRecordTypesEnumSOA DNSRecordTypesEnum = "SOA" + DNSRecordTypesEnumSRV DNSRecordTypesEnum = "SRV" + DNSRecordTypesEnumSSHFP DNSRecordTypesEnum = "SSHFP" + DNSRecordTypesEnumTXT DNSRecordTypesEnum = "TXT" + DNSRecordTypesEnumVirtualMachine DNSRecordTypesEnum = "VirtualMachine" +) + +// Defines values for DNSZoneNotFoundEnum. +const ( + DnsZoneNotFound DNSZoneNotFoundEnum = "dns_zone_not_found" +) + +// Defines values for DNSZoneNotVerifiedEnum. +const ( + DnsZoneNotVerified DNSZoneNotVerifiedEnum = "dns_zone_not_verified" +) + +// Defines values for DataCenterNotFoundEnum. +const ( + DataCenterNotFound DataCenterNotFoundEnum = "data_center_not_found" +) + +// Defines values for DeletionRestrictedEnum. +const ( + DeletionRestrictedEnumDeletionRestricted DeletionRestrictedEnum = "deletion_restricted" +) + +// Defines values for DiskBackupPolicyNotFoundEnum. +const ( + DiskBackupPolicyNotFound DiskBackupPolicyNotFoundEnum = "disk_backup_policy_not_found" +) + +// Defines values for DiskNotFoundEnum. +const ( + DiskNotFound DiskNotFoundEnum = "disk_not_found" +) + +// Defines values for DiskStateEnum. +const ( + DiskStateEnumBuilding DiskStateEnum = "building" + DiskStateEnumBuilt DiskStateEnum = "built" + DiskStateEnumConfiguring DiskStateEnum = "configuring" + DiskStateEnumFailed DiskStateEnum = "failed" + DiskStateEnumFormatting DiskStateEnum = "formatting" + DiskStateEnumImporting DiskStateEnum = "importing" + DiskStateEnumInstalling DiskStateEnum = "installing" + DiskStateEnumNotBuilt DiskStateEnum = "not_built" + DiskStateEnumResizing DiskStateEnum = "resizing" + DiskStateEnumRestoring DiskStateEnum = "restoring" +) + +// Defines values for DiskTemplateNotFoundEnum. +const ( + DiskTemplateNotFound DiskTemplateNotFoundEnum = "disk_template_not_found" +) + +// Defines values for DiskTemplateVersionNotFoundEnum. +const ( + DiskTemplateVersionNotFound DiskTemplateVersionNotFoundEnum = "disk_template_version_not_found" +) + +// Defines values for FileStorageVolumeNotFoundEnum. +const ( + FileStorageVolumeNotFound FileStorageVolumeNotFoundEnum = "file_storage_volume_not_found" +) + +// Defines values for FileStorageVolumeStateEnum. +const ( + FileStorageVolumeStateEnumConfiguring FileStorageVolumeStateEnum = "configuring" + FileStorageVolumeStateEnumFailed FileStorageVolumeStateEnum = "failed" + FileStorageVolumeStateEnumPending FileStorageVolumeStateEnum = "pending" + FileStorageVolumeStateEnumReady FileStorageVolumeStateEnum = "ready" +) + +// Defines values for FlexibleResourcesUnavailableToOrganizationEnum. +const ( + FlexibleResourcesUnavailableToOrganization FlexibleResourcesUnavailableToOrganizationEnum = "flexible_resources_unavailable_to_organization" +) + +// Defines values for GPUTypeNotFoundEnum. +const ( + GpuTypeNotFound GPUTypeNotFoundEnum = "gpu_type_not_found" +) + +// Defines values for IPAddressNotFoundEnum. +const ( + IpAddressNotFound IPAddressNotFoundEnum = "ip_address_not_found" +) + +// Defines values for IPAddressVersionEnum. +const ( + Ipv4 IPAddressVersionEnum = "ipv4" + Ipv6 IPAddressVersionEnum = "ipv6" +) + +// Defines values for IPAlreadyAllocatedEnum. +const ( + IpAlreadyAllocated IPAlreadyAllocatedEnum = "ip_already_allocated" +) + +// Defines values for IdentityNotLinkedToWebSessionEnum. +const ( + IdentityNotLinkedToWebSession IdentityNotLinkedToWebSessionEnum = "identity_not_linked_to_web_session" +) + +// Defines values for InterfaceNotFoundEnum. +const ( + InterfaceNotFound InterfaceNotFoundEnum = "interface_not_found" +) + +// Defines values for InvalidAPITokenEnum. +const ( + InvalidApiToken InvalidAPITokenEnum = "invalid_api_token" +) + +// Defines values for InvalidIPEnum. +const ( + InvalidIp InvalidIPEnum = "invalid_ip" +) + +// Defines values for InvalidSpecXMLEnum. +const ( + InvalidSpecXml InvalidSpecXMLEnum = "invalid_spec_xml" +) + +// Defines values for InvalidTimestampEnum. +const ( + InvalidTimestamp InvalidTimestampEnum = "invalid_timestamp" +) + +// Defines values for IssuerEnum. +const ( + Custom IssuerEnum = "custom" + LetsEncrypt IssuerEnum = "lets_encrypt" + SelfSigned IssuerEnum = "self_signed" +) + +// Defines values for LoadBalancerNotFoundEnum. +const ( + LoadBalancerNotFound LoadBalancerNotFoundEnum = "load_balancer_not_found" +) + +// Defines values for LoadBalancerResourceTypesEnum. +const ( + Tags LoadBalancerResourceTypesEnum = "tags" + VirtualMachineGroups LoadBalancerResourceTypesEnum = "virtual_machine_groups" + VirtualMachines LoadBalancerResourceTypesEnum = "virtual_machines" +) + +// Defines values for LoadBalancerRuleAlgorithmEnum. +const ( + LeastConnections LoadBalancerRuleAlgorithmEnum = "least_connections" + RoundRobin LoadBalancerRuleAlgorithmEnum = "round_robin" + Sticky LoadBalancerRuleAlgorithmEnum = "sticky" +) + +// Defines values for LoadBalancerRuleCheckProtocolEnum. +const ( + LoadBalancerRuleCheckProtocolEnumHTTP LoadBalancerRuleCheckProtocolEnum = "HTTP" + LoadBalancerRuleCheckProtocolEnumTCP LoadBalancerRuleCheckProtocolEnum = "TCP" +) + +// Defines values for LoadBalancerRuleHTTPStatusesEnum. +const ( + N2 LoadBalancerRuleHTTPStatusesEnum = "2" + N23 LoadBalancerRuleHTTPStatusesEnum = "23" + N234 LoadBalancerRuleHTTPStatusesEnum = "234" +) + +// Defines values for LoadBalancerRuleNotFoundEnum. +const ( + LoadBalancerRuleNotFound LoadBalancerRuleNotFoundEnum = "load_balancer_rule_not_found" +) + +// Defines values for LoadBalancerRuleProtocolEnum. +const ( + LoadBalancerRuleProtocolEnumHTTP LoadBalancerRuleProtocolEnum = "HTTP" + LoadBalancerRuleProtocolEnumHTTPS LoadBalancerRuleProtocolEnum = "HTTPS" + LoadBalancerRuleProtocolEnumTCP LoadBalancerRuleProtocolEnum = "TCP" +) + +// Defines values for LocationRequiredEnum. +const ( + LocationRequired LocationRequiredEnum = "location_required" +) + +// Defines values for MissingAPITokenEnum. +const ( + MissingApiToken MissingAPITokenEnum = "missing_api_token" +) + +// Defines values for NetworkNotFoundEnum. +const ( + NetworkNotFound NetworkNotFoundEnum = "network_not_found" +) + +// Defines values for NetworkSpeedProfileNotFoundEnum. +const ( + NetworkSpeedProfileNotFound NetworkSpeedProfileNotFoundEnum = "network_speed_profile_not_found" +) + +// Defines values for NoAllocationEnum. +const ( + NoAllocation NoAllocationEnum = "no_allocation" +) + +// Defines values for NoAvailableAddressesEnum. +const ( + NoAvailableAddresses NoAvailableAddressesEnum = "no_available_addresses" +) + +// Defines values for NoInterfaceAvailableEnum. +const ( + NoInterfaceAvailable NoInterfaceAvailableEnum = "no_interface_available" +) + +// Defines values for NoUserAssociatedWithIdentityEnum. +const ( + NoUserAssociatedWithIdentity NoUserAssociatedWithIdentityEnum = "no_user_associated_with_identity" +) + +// Defines values for NoVirtualMachineForAPITokenEnum. +const ( + NoVirtualMachineForApiToken NoVirtualMachineForAPITokenEnum = "no_virtual_machine_for_api_token" +) + +// Defines values for ObjectInTrashEnum. +const ( + ObjectInTrashEnumObjectInTrash ObjectInTrashEnum = "object_in_trash" +) + +// Defines values for OperatingSystemNotFoundEnum. +const ( + OperatingSystemNotFound OperatingSystemNotFoundEnum = "operating_system_not_found" +) + +// Defines values for OrganizationLimitReachedEnum. +const ( + OrganizationLimitReached OrganizationLimitReachedEnum = "organization_limit_reached" +) + +// Defines values for OrganizationNotActivatedEnum. +const ( + OrganizationNotActivated OrganizationNotActivatedEnum = "organization_not_activated" +) + +// Defines values for OrganizationNotFoundEnum. +const ( + OrganizationNotFound OrganizationNotFoundEnum = "organization_not_found" +) + +// Defines values for OrganizationSuspendedEnum. +const ( + OrganizationSuspended OrganizationSuspendedEnum = "organization_suspended" +) + +// Defines values for PermissionDeniedEnum. +const ( + PermissionDeniedEnumPermissionDenied PermissionDeniedEnum = "permission_denied" +) + +// Defines values for PrivacyTypesEnum. +const ( + Private PrivacyTypesEnum = "private" + Public PrivacyTypesEnum = "public" +) + +// Defines values for RateLimitReachedEnum. +const ( + RateLimitReachedEnumRateLimitReached RateLimitReachedEnum = "rate_limit_reached" +) + +// Defines values for ResourceCreationRestrictedEnum. +const ( + ResourceCreationRestrictedEnumResourceCreationRestricted ResourceCreationRestrictedEnum = "resource_creation_restricted" +) + +// Defines values for ResourceDoesNotSupportUnallocationEnum. +const ( + ResourceDoesNotSupportUnallocation ResourceDoesNotSupportUnallocationEnum = "resource_does_not_support_unallocation" +) + +// Defines values for SSHKeyNotFoundEnum. +const ( + SshKeyNotFound SSHKeyNotFoundEnum = "ssh_key_not_found" +) + +// Defines values for ScheduleIntervalTypeEnum. +const ( + Daily ScheduleIntervalTypeEnum = "daily" + Hourly ScheduleIntervalTypeEnum = "hourly" + Monthly ScheduleIntervalTypeEnum = "monthly" + Weekly ScheduleIntervalTypeEnum = "weekly" +) + +// Defines values for ScopeNotGrantedErrorEnum. +const ( + ScopeNotGranted ScopeNotGrantedErrorEnum = "scope_not_granted" +) + +// Defines values for SecurityGroupNotFoundEnum. +const ( + SecurityGroupNotFound SecurityGroupNotFoundEnum = "security_group_not_found" +) + +// Defines values for SecurityGroupRuleActionEnum. +const ( + Allow SecurityGroupRuleActionEnum = "allow" + Deny SecurityGroupRuleActionEnum = "deny" +) + +// Defines values for SecurityGroupRuleDirectionEnum. +const ( + Inbound SecurityGroupRuleDirectionEnum = "inbound" + Outbound SecurityGroupRuleDirectionEnum = "outbound" +) + +// Defines values for SecurityGroupRuleNotFoundEnum. +const ( + SecurityGroupRuleNotFound SecurityGroupRuleNotFoundEnum = "security_group_rule_not_found" +) + +// Defines values for SecurityGroupRuleProtocolEnum. +const ( + ICMP SecurityGroupRuleProtocolEnum = "ICMP" + TCP SecurityGroupRuleProtocolEnum = "TCP" + UDP SecurityGroupRuleProtocolEnum = "UDP" +) + +// Defines values for SpeedProfileAlreadyAssignedEnum. +const ( + SpeedProfileAlreadyAssigned SpeedProfileAlreadyAssignedEnum = "speed_profile_already_assigned" +) + +// Defines values for StorageSpeedEnum. +const ( + Nvme StorageSpeedEnum = "nvme" + Ssd StorageSpeedEnum = "ssd" +) + +// Defines values for TagColorsEnum. +const ( + Aqua TagColorsEnum = "aqua" + Black TagColorsEnum = "black" + Brown TagColorsEnum = "brown" + DarkBlue TagColorsEnum = "dark_blue" + DarkGray TagColorsEnum = "dark_gray" + Green TagColorsEnum = "green" + LightBlue TagColorsEnum = "light_blue" + LightBrown TagColorsEnum = "light_brown" + LightGray TagColorsEnum = "light_gray" + Orange TagColorsEnum = "orange" + OrangeRed TagColorsEnum = "orange_red" + PastelAqua TagColorsEnum = "pastel_aqua" + PastelBlack TagColorsEnum = "pastel_black" + PastelBrown TagColorsEnum = "pastel_brown" + PastelDarkBlue TagColorsEnum = "pastel_dark_blue" + PastelDarkGray TagColorsEnum = "pastel_dark_gray" + PastelGreen TagColorsEnum = "pastel_green" + PastelLightBlue TagColorsEnum = "pastel_light_blue" + PastelLightBrown TagColorsEnum = "pastel_light_brown" + PastelLightGray TagColorsEnum = "pastel_light_gray" + PastelOrange TagColorsEnum = "pastel_orange" + PastelOrangeRed TagColorsEnum = "pastel_orange_red" + PastelPink TagColorsEnum = "pastel_pink" + PastelPurple TagColorsEnum = "pastel_purple" + PastelRed TagColorsEnum = "pastel_red" + PastelTeal TagColorsEnum = "pastel_teal" + PastelYellow TagColorsEnum = "pastel_yellow" + Pink TagColorsEnum = "pink" + Purple TagColorsEnum = "purple" + Red TagColorsEnum = "red" + Teal TagColorsEnum = "teal" + Yellow TagColorsEnum = "yellow" +) + +// Defines values for TagNotFoundEnum. +const ( + TagNotFound TagNotFoundEnum = "tag_not_found" +) + +// Defines values for TaskNotFoundEnum. +const ( + TaskNotFound TaskNotFoundEnum = "task_not_found" +) + +// Defines values for TaskQueueingErrorEnum. +const ( + TaskQueueingErrorEnumTaskQueueingError TaskQueueingErrorEnum = "task_queueing_error" +) + +// Defines values for TaskStatusEnum. +const ( + TaskStatusEnumCompleted TaskStatusEnum = "completed" + TaskStatusEnumFailed TaskStatusEnum = "failed" + TaskStatusEnumPending TaskStatusEnum = "pending" + TaskStatusEnumRunning TaskStatusEnum = "running" +) + +// Defines values for TemplateSpecFieldTypeEnum. +const ( + Boolean TemplateSpecFieldTypeEnum = "Boolean" + Keyboard TemplateSpecFieldTypeEnum = "Keyboard" + Password TemplateSpecFieldTypeEnum = "Password" + Text TemplateSpecFieldTypeEnum = "Text" +) + +// Defines values for TrashObjectNotFoundEnum. +const ( + TrashObjectNotFound TrashObjectNotFoundEnum = "trash_object_not_found" +) + +// Defines values for UnauthorizedNetworkForAPITokenEnum. +const ( + UnauthorizedNetworkForApiToken UnauthorizedNetworkForAPITokenEnum = "unauthorized_network_for_api_token" +) + +// Defines values for ValidationErrorEnum. +const ( + ValidationErrorEnumValidationError ValidationErrorEnum = "validation_error" +) + +// Defines values for VirtualMachineBuildNotFoundEnum. +const ( + BuildNotFound VirtualMachineBuildNotFoundEnum = "build_not_found" +) + +// Defines values for VirtualMachineBuildStateEnum. +const ( + VirtualMachineBuildStateEnumBuilding VirtualMachineBuildStateEnum = "building" + VirtualMachineBuildStateEnumComplete VirtualMachineBuildStateEnum = "complete" + VirtualMachineBuildStateEnumDraft VirtualMachineBuildStateEnum = "draft" + VirtualMachineBuildStateEnumFailed VirtualMachineBuildStateEnum = "failed" + VirtualMachineBuildStateEnumPending VirtualMachineBuildStateEnum = "pending" +) + +// Defines values for VirtualMachineDiskAttachmentStateEnum. +const ( + VirtualMachineDiskAttachmentStateEnumAttached VirtualMachineDiskAttachmentStateEnum = "attached" + VirtualMachineDiskAttachmentStateEnumAttaching VirtualMachineDiskAttachmentStateEnum = "attaching" + VirtualMachineDiskAttachmentStateEnumDetached VirtualMachineDiskAttachmentStateEnum = "detached" + VirtualMachineDiskAttachmentStateEnumDetaching VirtualMachineDiskAttachmentStateEnum = "detaching" + VirtualMachineDiskAttachmentStateEnumFailed VirtualMachineDiskAttachmentStateEnum = "failed" +) + +// Defines values for VirtualMachineGPUPendingActionEnum. +const ( + Attach VirtualMachineGPUPendingActionEnum = "attach" + Detach VirtualMachineGPUPendingActionEnum = "detach" +) + +// Defines values for VirtualMachineGPUStatusEnum. +const ( + Attached VirtualMachineGPUStatusEnum = "attached" + Attaching VirtualMachineGPUStatusEnum = "attaching" + Detached VirtualMachineGPUStatusEnum = "detached" + Detaching VirtualMachineGPUStatusEnum = "detaching" + Unknown VirtualMachineGPUStatusEnum = "unknown" +) + +// Defines values for VirtualMachineGroupNotFoundEnum. +const ( + VirtualMachineGroupNotFound VirtualMachineGroupNotFoundEnum = "virtual_machine_group_not_found" +) + +// Defines values for VirtualMachineMustBeStartedEnum. +const ( + VirtualMachineMustBeStartedEnumVirtualMachineMustBeStarted VirtualMachineMustBeStartedEnum = "virtual_machine_must_be_started" +) + +// Defines values for VirtualMachineNetworkInterfaceNotFoundEnum. +const ( + VirtualMachineNetworkInterfaceNotFound VirtualMachineNetworkInterfaceNotFoundEnum = "virtual_machine_network_interface_not_found" +) + +// Defines values for VirtualMachineNotFoundEnum. +const ( + VirtualMachineNotFound VirtualMachineNotFoundEnum = "virtual_machine_not_found" +) + +// Defines values for VirtualMachinePackageNotFoundEnum. +const ( + PackageNotFound VirtualMachinePackageNotFoundEnum = "package_not_found" +) + +// Defines values for VirtualMachineStateEnum. +const ( + Allocated VirtualMachineStateEnum = "allocated" + Allocating VirtualMachineStateEnum = "allocating" + Failed VirtualMachineStateEnum = "failed" + Migrating VirtualMachineStateEnum = "migrating" + Orphaned VirtualMachineStateEnum = "orphaned" + Resetting VirtualMachineStateEnum = "resetting" + ShuttingDown VirtualMachineStateEnum = "shutting_down" + Started VirtualMachineStateEnum = "started" + Starting VirtualMachineStateEnum = "starting" + Stopped VirtualMachineStateEnum = "stopped" + Stopping VirtualMachineStateEnum = "stopping" + Transferring VirtualMachineStateEnum = "transferring" +) + +// Defines values for ZoneNotFoundEnum. +const ( + ZoneNotFound ZoneNotFoundEnum = "zone_not_found" +) + +// APIAuthenticator400Schema No API token was provided in the Authorization header. Ensure a token is provided prefixed with Bearer +type APIAuthenticator400Schema struct { + Code *MissingAPITokenEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// AddressList defines model for AddressList. +type AddressList struct { + Entries *[]AddressListEntry `json:"entries,omitempty"` + + // Global Whether the address list is global or not. + Global *bool `json:"global,omitempty"` + Id *string `json:"id,omitempty"` + + // Name Name of the address list. + Name *string `json:"name,omitempty"` +} + +// AddressListArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type AddressListArguments struct { + // Name Name of the address list. + Name *string `json:"name,omitempty"` +} + +// AddressListEntry defines model for AddressListEntry. +type AddressListEntry struct { + // Address Address or network. + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` + + // Name Optional name/comment. + Name *string `json:"name,omitempty"` +} + +// AddressListEntryArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type AddressListEntryArguments struct { + // Address Address or network to add to the list. + Address *string `json:"address,omitempty"` + + // Name Optional name/comment. + Name *string `json:"name,omitempty"` +} + +// AddressListEntryLookup All 'address_list_entry[]' params are mutually exclusive, only one can be provided. +type AddressListEntryLookup struct { + Id *string `json:"id,omitempty"` +} + +// AddressListEntryNotFoundEnum defines model for AddressListEntryNotFoundEnum. +type AddressListEntryNotFoundEnum string + +// AddressListLookup All 'address_list[]' params are mutually exclusive, only one can be provided. +type AddressListLookup struct { + Id *string `json:"id,omitempty"` +} + +// AddressListNotFoundEnum defines model for AddressListNotFoundEnum. +type AddressListNotFoundEnum string + +// Attachment defines model for Attachment. +type Attachment struct { + Digest *string `json:"digest,omitempty"` + FileName *string `json:"file_name,omitempty"` + FileSize *int `json:"file_size,omitempty"` + FileType *string `json:"file_type,omitempty"` + Token *string `json:"token,omitempty"` + Url *string `json:"url,omitempty"` +} + +// AuthSSHKey defines model for AuthSSHKey. +type AuthSSHKey struct { + Fingerprint *string `json:"fingerprint,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// AuthSSHKeyLookup All 'ssh_key[]' params are mutually exclusive, only one can be provided. +type AuthSSHKeyLookup struct { + Id *string `json:"id,omitempty"` +} + +// AuthSSHKeyProperties All 'ssh_key[]' params are mutually exclusive, only one can be provided. +type AuthSSHKeyProperties struct { + Key *string `json:"key,omitempty"` + Name *string `json:"name,omitempty"` +} + +// Certificate defines model for Certificate. +type Certificate struct { + AdditionalNames *[]string `json:"additional_names,omitempty"` + AuthorizationMethod *string `json:"authorization_method"` + Certificate *string `json:"certificate"` + + // CertificateApiUrl This is the URL that can be used to access this certificate's details. through the certificate API (a different API to this one). If null, this means that it is no longer available. If that is the case, you can get a new URL by resetting the API token for this certificate. + CertificateApiUrl *string `json:"certificate_api_url"` + Chain *string `json:"chain"` + CreatedAt *int `json:"created_at,omitempty"` + ExpiresAt *int `json:"expires_at"` + Id *string `json:"id,omitempty"` + IssueError *string `json:"issue_error"` + Issuer *IssuerEnum `json:"issuer,omitempty"` + LastIssuedAt *int `json:"last_issued_at"` + Name *string `json:"name,omitempty"` + PrivateKey *string `json:"private_key"` + State *CertificateStateEnum `json:"state,omitempty"` +} + +// CertificateLookup All 'certificates[]' params are mutually exclusive, only one can be provided. +type CertificateLookup struct { + Id *string `json:"id,omitempty"` +} + +// CertificateNotFoundEnum defines model for CertificateNotFoundEnum. +type CertificateNotFoundEnum string + +// CertificateStateEnum defines model for CertificateStateEnum. +type CertificateStateEnum string + +// Country defines model for Country. +type Country struct { + Eu *bool `json:"eu,omitempty"` + Id *string `json:"id,omitempty"` + IsoCode2 *string `json:"iso_code2,omitempty"` + IsoCode3 *string `json:"iso_code3,omitempty"` + Name *string `json:"name,omitempty"` + TimeZone *string `json:"time_zone"` +} + +// CountryNotFoundEnum defines model for CountryNotFoundEnum. +type CountryNotFoundEnum string + +// CountryState defines model for CountryState. +type CountryState struct { + Code *string `json:"code,omitempty"` + Country *Country `json:"country,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// CountryStateNotFoundEnum defines model for CountryStateNotFoundEnum. +type CountryStateNotFoundEnum string + +// Currency defines model for Currency. +type Currency struct { + Id *string `json:"id,omitempty"` + IsoCode *string `json:"iso_code,omitempty"` + Name *string `json:"name,omitempty"` + Symbol *string `json:"symbol,omitempty"` +} + +// CurrencyNotFoundEnum defines model for CurrencyNotFoundEnum. +type CurrencyNotFoundEnum string + +// DNSRecord defines model for DNSRecord. +type DNSRecord struct { + Content *string `json:"content,omitempty"` + ContentAttributes *DNSRecordContentAttributes `json:"content_attributes,omitempty"` + FullName *string `json:"full_name,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name"` + Priority *int `json:"priority"` + Ttl *int `json:"ttl"` + Type *DNSRecordTypesEnum `json:"type,omitempty"` +} + +// DNSRecordArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type DNSRecordArguments struct { + // Content All 'content[]' params are mutually exclusive, only one can be provided. + Content *DNSRecordContentArguments `json:"content,omitempty"` + + // Name The name of the record + Name *string `json:"name,omitempty"` + Priority *int `json:"priority,omitempty"` + Ttl *int `json:"ttl,omitempty"` + Type *DNSRecordTypesEnum `json:"type,omitempty"` +} + +// DNSRecordContentArguments All 'content[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArguments struct { + // A All 'A[]' params are mutually exclusive, only one can be provided. + A *DNSRecordContentArgumentsForA `json:"A,omitempty"` + + // AAAA All 'AAAA[]' params are mutually exclusive, only one can be provided. + AAAA *DNSRecordContentArgumentsForAAAA `json:"AAAA,omitempty"` + + // ALIAS All 'ALIAS[]' params are mutually exclusive, only one can be provided. + ALIAS *DNSRecordContentArgumentsForALIAS `json:"ALIAS,omitempty"` + + // CAA All 'CAA[]' params are mutually exclusive, only one can be provided. + CAA *DNSRecordContentArgumentsForCAA `json:"CAA,omitempty"` + + // CNAME All 'CNAME[]' params are mutually exclusive, only one can be provided. + CNAME *DNSRecordContentArgumentsForCNAME `json:"CNAME,omitempty"` + + // IPS All 'IPS[]' params are mutually exclusive, only one can be provided. + IPS *DNSRecordContentArgumentsForIPS `json:"IPS,omitempty"` + + // MX All 'MX[]' params are mutually exclusive, only one can be provided. + MX *DNSRecordContentArgumentsForMX `json:"MX,omitempty"` + + // NS All 'NS[]' params are mutually exclusive, only one can be provided. + NS *DNSRecordContentArgumentsForNS `json:"NS,omitempty"` + + // PTR All 'PTR[]' params are mutually exclusive, only one can be provided. + PTR *DNSRecordContentArgumentsForPTR `json:"PTR,omitempty"` + + // SOA All 'SOA[]' params are mutually exclusive, only one can be provided. + SOA *DNSRecordContentArgumentsForSOA `json:"SOA,omitempty"` + + // SRV All 'SRV[]' params are mutually exclusive, only one can be provided. + SRV *DNSRecordContentArgumentsForSRV `json:"SRV,omitempty"` + + // SSHFP All 'SSHFP[]' params are mutually exclusive, only one can be provided. + SSHFP *DNSRecordContentArgumentsForSSHFP `json:"SSHFP,omitempty"` + + // TXT All 'TXT[]' params are mutually exclusive, only one can be provided. + TXT *DNSRecordContentArgumentsForTXT `json:"TXT,omitempty"` + + // VirtualMachine All 'VirtualMachine[]' params are mutually exclusive, only one can be provided. + VirtualMachine *DNSRecordContentArgumentsForVirtualMachine `json:"VirtualMachine,omitempty"` +} + +// DNSRecordContentArgumentsForA All 'A[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForA struct { + IpAddress *string `json:"ip_address,omitempty"` +} + +// DNSRecordContentArgumentsForAAAA All 'AAAA[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForAAAA struct { + IpAddress *string `json:"ip_address,omitempty"` +} + +// DNSRecordContentArgumentsForALIAS All 'ALIAS[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForALIAS struct { + Hostname *string `json:"hostname,omitempty"` +} + +// DNSRecordContentArgumentsForCAA All 'CAA[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForCAA struct { + Flag *string `json:"flag,omitempty"` + Tag *string `json:"tag,omitempty"` + Value *string `json:"value,omitempty"` +} + +// DNSRecordContentArgumentsForCNAME All 'CNAME[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForCNAME struct { + Hostname *string `json:"hostname,omitempty"` +} + +// DNSRecordContentArgumentsForIPS All 'IPS[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForIPS struct { + IpAddresses *string `json:"ip_addresses,omitempty"` +} + +// DNSRecordContentArgumentsForMX All 'MX[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForMX struct { + Hostname *string `json:"hostname,omitempty"` +} + +// DNSRecordContentArgumentsForNS All 'NS[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForNS struct { + Hostname *string `json:"hostname,omitempty"` +} + +// DNSRecordContentArgumentsForPTR All 'PTR[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForPTR struct { + Hostname *string `json:"hostname,omitempty"` +} + +// DNSRecordContentArgumentsForSOA All 'SOA[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForSOA = interface{} + +// DNSRecordContentArgumentsForSRV All 'SRV[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForSRV struct { + Port *string `json:"port,omitempty"` + Target *string `json:"target,omitempty"` + Weight *string `json:"weight,omitempty"` +} + +// DNSRecordContentArgumentsForSSHFP All 'SSHFP[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForSSHFP struct { + Algorithm *string `json:"algorithm,omitempty"` + Fingerprint *string `json:"fingerprint,omitempty"` + FingerprintType *string `json:"fingerprint_type,omitempty"` +} + +// DNSRecordContentArgumentsForTXT All 'TXT[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForTXT struct { + Content *string `json:"content,omitempty"` +} + +// DNSRecordContentArgumentsForVirtualMachine All 'VirtualMachine[]' params are mutually exclusive, only one can be provided. +type DNSRecordContentArgumentsForVirtualMachine struct { + VirtualMachine *string `json:"virtual_machine,omitempty"` +} + +// DNSRecordContentAttributes defines model for DNSRecordContentAttributes. +type DNSRecordContentAttributes struct { + A *RecordContentAttributesForA `json:"A"` + AAAA *RecordContentAttributesForAAAA `json:"AAAA"` + ALIAS *RecordContentAttributesForALIAS `json:"ALIAS"` + CAA *RecordContentAttributesForCAA `json:"CAA"` + CNAME *RecordContentAttributesForCNAME `json:"CNAME"` + IPS *RecordContentAttributesForIPS `json:"IPS"` + MX *RecordContentAttributesForMX `json:"MX"` + NS *RecordContentAttributesForNS `json:"NS"` + PTR *RecordContentAttributesForPTR `json:"PTR"` + SOA *map[string]interface{} `json:"SOA"` + SRV *RecordContentAttributesForSRV `json:"SRV"` + SSHFP *RecordContentAttributesForSSHFP `json:"SSHFP"` + TXT *RecordContentAttributesForTXT `json:"TXT"` + VirtualMachine *RecordContentAttributesForVirtualMachine `json:"VirtualMachine"` +} + +// DNSRecordLookup All 'dns_record[]' params are mutually exclusive, only one can be provided. +type DNSRecordLookup struct { + Id *string `json:"id,omitempty"` +} + +// DNSRecordNotFoundEnum defines model for DNSRecordNotFoundEnum. +type DNSRecordNotFoundEnum string + +// DNSRecordTypesEnum defines model for DNSRecordTypesEnum. +type DNSRecordTypesEnum string + +// DNSZone defines model for DNSZone. +type DNSZone struct { + DefaultTtl *int `json:"default_ttl,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Verified *bool `json:"verified,omitempty"` +} + +// DNSZoneArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type DNSZoneArguments struct { + DefaultTtl *int `json:"default_ttl,omitempty"` + + // Name The name of the zone (only available for creation) + Name *string `json:"name,omitempty"` +} + +// DNSZoneLookup All 'dns_zone[]' params are mutually exclusive, only one can be provided. +type DNSZoneLookup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// DNSZoneNotFoundEnum defines model for DNSZoneNotFoundEnum. +type DNSZoneNotFoundEnum string + +// DNSZoneNotVerifiedEnum defines model for DNSZoneNotVerifiedEnum. +type DNSZoneNotVerifiedEnum string + +// DataCenter defines model for DataCenter. +type DataCenter struct { + Country *Country `json:"country,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// DataCenterLookup All 'data_center[]' params are mutually exclusive, only one can be provided. +type DataCenterLookup struct { + Id *string `json:"id,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// DataCenterNotFoundEnum defines model for DataCenterNotFoundEnum. +type DataCenterNotFoundEnum string + +// DataCenterNotFoundSchema No data center was found matching any of the criteria provided in the arguments +type DataCenterNotFoundSchema struct { + Code *DataCenterNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DecimalOrUnlimited defines model for DecimalOrUnlimited. +type DecimalOrUnlimited struct { + Unlimited *bool `json:"unlimited,omitempty"` + Value *float32 `json:"value"` +} + +// DeleteDiskBackupPolicy200ResponseDiskBackupPolicy defines model for DeleteDiskBackupPolicy200ResponseDiskBackupPolicy. +type DeleteDiskBackupPolicy200ResponseDiskBackupPolicy struct { + Id *string `json:"id,omitempty"` +} + +// DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy defines model for DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy. +type DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy struct { + AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` + Id *string `json:"id,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` +} + +// DeleteFileStorageVolume200ResponseFileStorageVolume defines model for DeleteFileStorageVolume200ResponseFileStorageVolume. +type DeleteFileStorageVolume200ResponseFileStorageVolume struct { + Associations *[]string `json:"associations,omitempty"` + DataCenter *DeleteFileStorageVolumePartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + + // NfsLocation The NFS location of where to mount the volume from. + NfsLocation *string `json:"nfs_location"` + + // Size The size of the volume in bytes. + Size *int `json:"size"` + State *FileStorageVolumeStateEnum `json:"state,omitempty"` +} + +// DeleteFileStorageVolumePartDataCenter defines model for DeleteFileStorageVolumePartDataCenter. +type DeleteFileStorageVolumePartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// DeleteLoadBalancer200ResponseLoadBalancer defines model for DeleteLoadBalancer200ResponseLoadBalancer. +type DeleteLoadBalancer200ResponseLoadBalancer struct { + ApiReference *string `json:"api_reference"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule defines model for DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule. +type DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule struct { + Id *string `json:"id,omitempty"` +} + +// DeleteSecurityGroup200ResponseSecurityGroup defines model for DeleteSecurityGroup200ResponseSecurityGroup. +type DeleteSecurityGroup200ResponseSecurityGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule defines model for DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule. +type DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule struct { + Id *string `json:"id,omitempty"` +} + +// DeleteVirtualMachine200ResponseVirtualMachine defines model for DeleteVirtualMachine200ResponseVirtualMachine. +type DeleteVirtualMachine200ResponseVirtualMachine struct { + AttachedIso *ISO `json:"attached_iso"` + CpuCores *int `json:"cpu_cores"` + CreatedAt *int `json:"created_at,omitempty"` + Description *string `json:"description"` + Fqdn *string `json:"fqdn,omitempty"` + GpuType *DeleteVirtualMachinePartGPUType `json:"gpu_type"` + Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` + Group *VirtualMachineGroup `json:"group"` + Hostname *string `json:"hostname,omitempty"` + Id *string `json:"id,omitempty"` + InitialRootPassword *string `json:"initial_root_password"` + IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` + MemoryInGb *int `json:"memory_in_gb"` + Name *string `json:"name,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Package *VirtualMachinePackage `json:"package"` + State *VirtualMachineStateEnum `json:"state,omitempty"` + TagNames *[]string `json:"tag_names,omitempty"` + Tags *[]Tag `json:"tags,omitempty"` + UseDedicatedCpus *bool `json:"use_dedicated_cpus"` + Zone *Zone `json:"zone,omitempty"` +} + +// DeleteVirtualMachinePartGPUType defines model for DeleteVirtualMachinePartGPUType. +type DeleteVirtualMachinePartGPUType struct { + Id *string `json:"id,omitempty"` + Manufacturer *string `json:"manufacturer,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MemoryType *string `json:"memory_type,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// DeletionRestricted defines model for DeletionRestricted. +type DeletionRestricted struct { + Errors *[]string `json:"errors,omitempty"` +} + +// DeletionRestrictedEnum defines model for DeletionRestrictedEnum. +type DeletionRestrictedEnum string + +// Disk defines model for Disk. +type Disk struct { + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Installation *DiskInstallation `json:"installation"` + IoProfile *DiskIOProfile `json:"io_profile"` + Name *string `json:"name,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + State *DiskStateEnum `json:"state,omitempty"` + StorageSpeed *StorageSpeedEnum `json:"storage_speed,omitempty"` + VirtualMachineDisk *VirtualMachineDisk `json:"virtual_machine_disk"` + Wwn *string `json:"wwn,omitempty"` +} + +// DiskBackupPolicyArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type DiskBackupPolicyArguments struct { + Retention *int `json:"retention,omitempty"` + + // Schedule All 'schedule[]' params are mutually exclusive, only one can be provided. + Schedule *ScheduleArguments `json:"schedule,omitempty"` +} + +// DiskBackupPolicyLookup All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. +type DiskBackupPolicyLookup struct { + Id *string `json:"id,omitempty"` +} + +// DiskBackupPolicyNotFoundEnum defines model for DiskBackupPolicyNotFoundEnum. +type DiskBackupPolicyNotFoundEnum string + +// DiskBackupPolicyTarget defines model for DiskBackupPolicyTarget. +type DiskBackupPolicyTarget struct { + Target *DiskBackupPolicyTarget_Target `json:"target,omitempty"` +} + +// DiskBackupPolicyTarget_Target defines model for DiskBackupPolicyTarget.Target. +type DiskBackupPolicyTarget_Target struct { + union json.RawMessage +} + +// DiskIOProfile defines model for DiskIOProfile. +type DiskIOProfile struct { + Id *string `json:"id,omitempty"` + Iops *int `json:"iops"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` + SpeedInMb *int `json:"speed_in_mb"` +} + +// DiskInstallation defines model for DiskInstallation. +type DiskInstallation struct { + Attributes *[]DiskInstallationAttribute `json:"attributes,omitempty"` + DiskTemplateVersion *DiskTemplateVersion `json:"disk_template_version,omitempty"` + Id *string `json:"id,omitempty"` +} + +// DiskInstallationAttribute defines model for DiskInstallationAttribute. +type DiskInstallationAttribute struct { + Description *string `json:"description"` + Key *string `json:"key,omitempty"` + Label *string `json:"label,omitempty"` + Protect *bool `json:"protect,omitempty"` + Value *string `json:"value"` +} + +// DiskLookup All 'disk[]' params are mutually exclusive, only one can be provided. +type DiskLookup struct { + Id *string `json:"id,omitempty"` +} + +// DiskNotFoundEnum defines model for DiskNotFoundEnum. +type DiskNotFoundEnum string + +// DiskStateEnum defines model for DiskStateEnum. +type DiskStateEnum string + +// DiskTemplate defines model for DiskTemplate. +type DiskTemplate struct { + Description *string `json:"description"` + Id *string `json:"id,omitempty"` + LatestVersion *DiskTemplateVersion `json:"latest_version"` + Name *string `json:"name,omitempty"` + OperatingSystem *OperatingSystem `json:"operating_system"` + Permalink *string `json:"permalink,omitempty"` + Universal *bool `json:"universal,omitempty"` +} + +// DiskTemplateLookup All 'disk_template[]' params are mutually exclusive, only one can be provided. +type DiskTemplateLookup struct { + Id *string `json:"id,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// DiskTemplateNotFoundEnum defines model for DiskTemplateNotFoundEnum. +type DiskTemplateNotFoundEnum string + +// DiskTemplateNotFoundSchema No disk template was found matching any of the criteria provided in the arguments +type DiskTemplateNotFoundSchema struct { + Code *DiskTemplateNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DiskTemplateVersion defines model for DiskTemplateVersion. +type DiskTemplateVersion struct { + DiskTemplate *DiskTemplate `json:"disk_template,omitempty"` + Id *string `json:"id,omitempty"` + Number *int `json:"number,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + Stable *bool `json:"stable,omitempty"` +} + +// DiskTemplateVersionNotFoundEnum defines model for DiskTemplateVersionNotFoundEnum. +type DiskTemplateVersionNotFoundEnum string + +// FileStorageVolumeArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type FileStorageVolumeArguments struct { + Associations *[]string `json:"associations,omitempty"` + + // DataCenter All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenter *DataCenterLookup `json:"data_center,omitempty"` + + // Name Unique name to help identify the volume. + Name *string `json:"name,omitempty"` +} + +// FileStorageVolumeLookup All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. +type FileStorageVolumeLookup struct { + Id *string `json:"id,omitempty"` +} + +// FileStorageVolumeNotFoundEnum defines model for FileStorageVolumeNotFoundEnum. +type FileStorageVolumeNotFoundEnum string + +// FileStorageVolumeStateEnum defines model for FileStorageVolumeStateEnum. +type FileStorageVolumeStateEnum string + +// FlexibleResourcesUnavailableToOrganizationEnum defines model for FlexibleResourcesUnavailableToOrganizationEnum. +type FlexibleResourcesUnavailableToOrganizationEnum string + +// FlexibleResourcesUnavailableToOrganizationSchema The organization is not permitted to use flexible resources +type FlexibleResourcesUnavailableToOrganizationSchema struct { + Code *FlexibleResourcesUnavailableToOrganizationEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// GPUType defines model for GPUType. +type GPUType struct { + DataCenters *[]DataCenter `json:"data_centers,omitempty"` + Id *string `json:"id,omitempty"` + Manufacturer *string `json:"manufacturer,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MemoryType *string `json:"memory_type,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GPUTypeLookup All 'gpu_type[]' params are mutually exclusive, only one can be provided. +type GPUTypeLookup struct { + Id *string `json:"id,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GPUTypeNotFoundEnum defines model for GPUTypeNotFoundEnum. +type GPUTypeNotFoundEnum string + +// GetAddressLists200ResponseAddressLists defines model for GetAddressLists200ResponseAddressLists. +type GetAddressLists200ResponseAddressLists struct { + // Global Whether the address list is global or not. + Global *bool `json:"global,omitempty"` + Id *string `json:"id,omitempty"` + + // Name Name of the address list. + Name *string `json:"name,omitempty"` +} + +// GetCountries200ResponseCountries defines model for GetCountries200ResponseCountries. +type GetCountries200ResponseCountries struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetCountryCountryStates200ResponseCountryStates defines model for GetCountryCountryStates200ResponseCountryStates. +type GetCountryCountryStates200ResponseCountryStates struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetCurrencies200ResponseCurrencies defines model for GetCurrencies200ResponseCurrencies. +type GetCurrencies200ResponseCurrencies struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetDataCenter200ResponseDataCenter defines model for GetDataCenter200ResponseDataCenter. +type GetDataCenter200ResponseDataCenter struct { + Country *GetDataCenterPartCountry `json:"country,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetDataCenterDefaultNetwork200ResponseNetwork defines model for GetDataCenterDefaultNetwork200ResponseNetwork. +type GetDataCenterDefaultNetwork200ResponseNetwork struct { + DataCenter *GetDataCenterDefaultNetworkPartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetDataCenterDefaultNetworkPartDataCenter defines model for GetDataCenterDefaultNetworkPartDataCenter. +type GetDataCenterDefaultNetworkPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetDataCenterGPUTypes200ResponseGPUTypes defines model for GetDataCenterGPUTypes200ResponseGPUTypes. +type GetDataCenterGPUTypes200ResponseGPUTypes struct { + Id *string `json:"id,omitempty"` + Manufacturer *string `json:"manufacturer,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MemoryType *string `json:"memory_type,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetDataCenterPartCountry defines model for GetDataCenterPartCountry. +type GetDataCenterPartCountry struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetDataCenters200ResponseDataCenters defines model for GetDataCenters200ResponseDataCenters. +type GetDataCenters200ResponseDataCenters struct { + Country *GetDataCentersPartCountry `json:"country,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetDataCentersPartCountry defines model for GetDataCentersPartCountry. +type GetDataCentersPartCountry struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetDisk200ResponseDisk defines model for GetDisk200ResponseDisk. +type GetDisk200ResponseDisk struct { + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Installation *DiskInstallation `json:"installation"` + IoProfile *DiskIOProfile `json:"io_profile"` + Name *string `json:"name,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + State *DiskStateEnum `json:"state,omitempty"` + StorageSpeed *StorageSpeedEnum `json:"storage_speed,omitempty"` + VirtualMachineDisk *GetDiskPartVirtualMachineDisk `json:"virtual_machine_disk"` + Wwn *string `json:"wwn,omitempty"` +} + +// GetDiskBackupPolicy200ResponseDiskBackupPolicy defines model for GetDiskBackupPolicy200ResponseDiskBackupPolicy. +type GetDiskBackupPolicy200ResponseDiskBackupPolicy struct { + AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` + Id *string `json:"id,omitempty"` + Retention *int `json:"retention,omitempty"` + Schedule *Schedule `json:"schedule,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` + TotalSize *float32 `json:"total_size,omitempty"` +} + +// GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies defines model for GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies. +type GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies struct { + Id *string `json:"id,omitempty"` + Retention *int `json:"retention,omitempty"` + Schedule *GetDiskDiskBackupPoliciesPartSchedule `json:"schedule,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` + TotalSize *float32 `json:"total_size,omitempty"` +} + +// GetDiskDiskBackupPoliciesPartSchedule defines model for GetDiskDiskBackupPoliciesPartSchedule. +type GetDiskDiskBackupPoliciesPartSchedule struct { + Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` + NextInvocationAt *int `json:"next_invocation_at,omitempty"` +} + +// GetDiskPartVirtualMachine defines model for GetDiskPartVirtualMachine. +type GetDiskPartVirtualMachine struct { + Fqdn *string `json:"fqdn,omitempty"` + Id *string `json:"id,omitempty"` +} + +// GetDiskPartVirtualMachineDisk defines model for GetDiskPartVirtualMachineDisk. +type GetDiskPartVirtualMachineDisk struct { + AttachOnBoot *bool `json:"attach_on_boot,omitempty"` + Boot *bool `json:"boot,omitempty"` + State *VirtualMachineDiskAttachmentStateEnum `json:"state,omitempty"` + VirtualMachine *GetDiskPartVirtualMachine `json:"virtual_machine,omitempty"` +} + +// GetDiskTemplate200ResponseDiskTemplate defines model for GetDiskTemplate200ResponseDiskTemplate. +type GetDiskTemplate200ResponseDiskTemplate struct { + Description *string `json:"description"` + Id *string `json:"id,omitempty"` + LatestVersion *GetDiskTemplatePartLatestVersion `json:"latest_version"` + Name *string `json:"name,omitempty"` + OperatingSystem *OperatingSystem `json:"operating_system"` + Permalink *string `json:"permalink,omitempty"` + Universal *bool `json:"universal,omitempty"` +} + +// GetDiskTemplatePartLatestVersion defines model for GetDiskTemplatePartLatestVersion. +type GetDiskTemplatePartLatestVersion struct { + Id *string `json:"id,omitempty"` +} + +// GetDiskTemplateVersion200ResponseDiskTemplateVersion defines model for GetDiskTemplateVersion200ResponseDiskTemplateVersion. +type GetDiskTemplateVersion200ResponseDiskTemplateVersion struct { + DiskTemplate *GetDiskTemplateVersionPartDiskTemplate `json:"disk_template,omitempty"` + Id *string `json:"id,omitempty"` + Number *int `json:"number,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + Stable *bool `json:"stable,omitempty"` +} + +// GetDiskTemplateVersionPartDiskTemplate defines model for GetDiskTemplateVersionPartDiskTemplate. +type GetDiskTemplateVersionPartDiskTemplate struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion defines model for GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion. +type GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion struct { + DiskTemplate *GetDiskTemplateVersionSpecPartDiskTemplate `json:"disk_template,omitempty"` + Id *string `json:"id,omitempty"` + Number *int `json:"number,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + Stable *bool `json:"stable,omitempty"` +} + +// GetDiskTemplateVersionSpecPartDiskTemplate defines model for GetDiskTemplateVersionSpecPartDiskTemplate. +type GetDiskTemplateVersionSpecPartDiskTemplate struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetDiskTemplateVersions200ResponseDiskTemplate defines model for GetDiskTemplateVersions200ResponseDiskTemplate. +type GetDiskTemplateVersions200ResponseDiskTemplate struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetDiskTemplateVersions200ResponseDiskTemplateVersions defines model for GetDiskTemplateVersions200ResponseDiskTemplateVersions. +type GetDiskTemplateVersions200ResponseDiskTemplateVersions struct { + Id *string `json:"id,omitempty"` + Number *int `json:"number,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + Stable *bool `json:"stable,omitempty"` +} + +// GetFileStorageVolume200ResponseFileStorageVolume defines model for GetFileStorageVolume200ResponseFileStorageVolume. +type GetFileStorageVolume200ResponseFileStorageVolume struct { + Associations *[]string `json:"associations,omitempty"` + DataCenter *GetFileStorageVolumePartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + + // NfsLocation The NFS location of where to mount the volume from. + NfsLocation *string `json:"nfs_location"` + + // Size The size of the volume in bytes. + Size *int `json:"size"` + State *FileStorageVolumeStateEnum `json:"state,omitempty"` +} + +// GetFileStorageVolumePartDataCenter defines model for GetFileStorageVolumePartDataCenter. +type GetFileStorageVolumePartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetGPUType200ResponseGPUType defines model for GetGPUType200ResponseGPUType. +type GetGPUType200ResponseGPUType struct { + DataCenters *[]GetGPUTypePartDataCenters `json:"data_centers,omitempty"` + Id *string `json:"id,omitempty"` + Manufacturer *string `json:"manufacturer,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MemoryType *string `json:"memory_type,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetGPUTypePartDataCenters defines model for GetGPUTypePartDataCenters. +type GetGPUTypePartDataCenters struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetGPUTypes200ResponseGPUTypes defines model for GetGPUTypes200ResponseGPUTypes. +type GetGPUTypes200ResponseGPUTypes struct { + DataCenters *[]GetGPUTypesPartDataCenters `json:"data_centers,omitempty"` + Id *string `json:"id,omitempty"` + Manufacturer *string `json:"manufacturer,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MemoryType *string `json:"memory_type,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetGPUTypesPartDataCenters defines model for GetGPUTypesPartDataCenters. +type GetGPUTypesPartDataCenters struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetIPAddress200ResponseAllocation defines model for GetIPAddress200ResponseAllocation. +type GetIPAddress200ResponseAllocation struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetLoadBalancer200ResponseLoadBalancer defines model for GetLoadBalancer200ResponseLoadBalancer. +type GetLoadBalancer200ResponseLoadBalancer struct { + ApiReference *string `json:"api_reference"` + BackendCertificate *string `json:"backend_certificate,omitempty"` + BackendCertificateKey *string `json:"backend_certificate_key,omitempty"` + DataCenter *GetLoadBalancerPartDataCenter `json:"data_center,omitempty"` + EnableWeighting *bool `json:"enable_weighting,omitempty"` + HttpsRedirect *bool `json:"https_redirect,omitempty"` + Id *string `json:"id,omitempty"` + IpAddress *GetLoadBalancerPartIPAddress `json:"ip_address,omitempty"` + Name *string `json:"name,omitempty"` + ResourceIds *[]string `json:"resource_ids,omitempty"` + ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` + Resources *[]LoadBalancerResource `json:"resources,omitempty"` + StandbyVms *[]string `json:"standby_vms,omitempty"` + Weights *[]LoadBalancerWeight `json:"weights,omitempty"` +} + +// GetLoadBalancerPartDataCenter defines model for GetLoadBalancerPartDataCenter. +type GetLoadBalancerPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetLoadBalancerPartIPAddress defines model for GetLoadBalancerPartIPAddress. +type GetLoadBalancerPartIPAddress struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// GetLoadBalancerRules200ResponseLoadBalancerRules defines model for GetLoadBalancerRules200ResponseLoadBalancerRules. +type GetLoadBalancerRules200ResponseLoadBalancerRules struct { + Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` + Certificates *[]GetLoadBalancerRulesPartCertificates `json:"certificates,omitempty"` + CheckEnabled *bool `json:"check_enabled,omitempty"` + DestinationPort *int `json:"destination_port,omitempty"` + Id *string `json:"id,omitempty"` + ListenPort *int `json:"listen_port,omitempty"` + Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` +} + +// GetLoadBalancerRulesPartCertificates defines model for GetLoadBalancerRulesPartCertificates. +type GetLoadBalancerRulesPartCertificates struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule defines model for GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule. +type GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule struct { + Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` + BackendSsl *bool `json:"backend_ssl,omitempty"` + Certificates *[]GetLoadBalancersRulesLoadBalancerRulePartCertificates `json:"certificates,omitempty"` + CheckEnabled *bool `json:"check_enabled,omitempty"` + CheckFall *int `json:"check_fall,omitempty"` + CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses"` + CheckInterval *int `json:"check_interval,omitempty"` + CheckPath *string `json:"check_path,omitempty"` + CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol"` + CheckRise *int `json:"check_rise,omitempty"` + CheckTimeout *int `json:"check_timeout,omitempty"` + DestinationPort *int `json:"destination_port,omitempty"` + Id *string `json:"id,omitempty"` + ListenPort *int `json:"listen_port,omitempty"` + LoadBalancer *GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer `json:"load_balancer,omitempty"` + PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` + Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` + ProxyProtocol *bool `json:"proxy_protocol,omitempty"` +} + +// GetLoadBalancersRulesLoadBalancerRulePartCertificates defines model for GetLoadBalancersRulesLoadBalancerRulePartCertificates. +type GetLoadBalancersRulesLoadBalancerRulePartCertificates struct { + AdditionalNames *[]string `json:"additional_names,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + State *CertificateStateEnum `json:"state,omitempty"` +} + +// GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer defines model for GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer. +type GetLoadBalancersRulesLoadBalancerRulePartLoadBalancer struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetOperatingSystems200ResponseOperatingSystems defines model for GetOperatingSystems200ResponseOperatingSystems. +type GetOperatingSystems200ResponseOperatingSystems struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetOrganizationAddressLists200ResponseAddressLists defines model for GetOrganizationAddressLists200ResponseAddressLists. +type GetOrganizationAddressLists200ResponseAddressLists struct { + // Global Whether the address list is global or not. + Global *bool `json:"global,omitempty"` + Id *string `json:"id,omitempty"` + + // Name Name of the address list. + Name *string `json:"name,omitempty"` +} + +// GetOrganizationAvailableNetworks200ResponseNetworks defines model for GetOrganizationAvailableNetworks200ResponseNetworks. +type GetOrganizationAvailableNetworks200ResponseNetworks struct { + DataCenter *GetOrganizationAvailableNetworksPartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetOrganizationAvailableNetworks200ResponseVirtualNetworks defines model for GetOrganizationAvailableNetworks200ResponseVirtualNetworks. +type GetOrganizationAvailableNetworks200ResponseVirtualNetworks struct { + DataCenter *GetOrganizationAvailableNetworksPartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetOrganizationAvailableNetworksPartDataCenter defines model for GetOrganizationAvailableNetworksPartDataCenter. +type GetOrganizationAvailableNetworksPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetOrganizationCertificates200ResponseCertificates defines model for GetOrganizationCertificates200ResponseCertificates. +type GetOrganizationCertificates200ResponseCertificates struct { + ExpiresAt *int `json:"expires_at"` + Id *string `json:"id,omitempty"` + Issuer *IssuerEnum `json:"issuer,omitempty"` + LastIssuedAt *int `json:"last_issued_at"` + Name *string `json:"name,omitempty"` + State *CertificateStateEnum `json:"state,omitempty"` +} + +// GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies defines model for GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies. +type GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies struct { + Id *string `json:"id,omitempty"` + Retention *int `json:"retention,omitempty"` + Schedule *GetOrganizationDiskBackupPoliciesPartSchedule `json:"schedule,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` + TotalSize *float32 `json:"total_size,omitempty"` +} + +// GetOrganizationDiskBackupPoliciesPartSchedule defines model for GetOrganizationDiskBackupPoliciesPartSchedule. +type GetOrganizationDiskBackupPoliciesPartSchedule struct { + Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` + NextInvocationAt *int `json:"next_invocation_at,omitempty"` +} + +// GetOrganizationDiskTemplates200ResponseDiskTemplates defines model for GetOrganizationDiskTemplates200ResponseDiskTemplates. +type GetOrganizationDiskTemplates200ResponseDiskTemplates struct { + Description *string `json:"description"` + Id *string `json:"id,omitempty"` + LatestVersion *GetOrganizationDiskTemplatesPartLatestVersion `json:"latest_version"` + Name *string `json:"name,omitempty"` + OperatingSystem *GetOrganizationDiskTemplatesPartOperatingSystem `json:"operating_system"` + Permalink *string `json:"permalink,omitempty"` + Universal *bool `json:"universal,omitempty"` +} + +// GetOrganizationDiskTemplatesPartLatestVersion defines model for GetOrganizationDiskTemplatesPartLatestVersion. +type GetOrganizationDiskTemplatesPartLatestVersion struct { + Id *string `json:"id,omitempty"` + Number *int `json:"number,omitempty"` +} + +// GetOrganizationDiskTemplatesPartOperatingSystem defines model for GetOrganizationDiskTemplatesPartOperatingSystem. +type GetOrganizationDiskTemplatesPartOperatingSystem struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetOrganizationDisks200ResponseDisk defines model for GetOrganizationDisks200ResponseDisk. +type GetOrganizationDisks200ResponseDisk struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + State *DiskStateEnum `json:"state,omitempty"` + VirtualMachineDisk *GetOrganizationDisksPartVirtualMachineDisk `json:"virtual_machine_disk"` + Wwn *string `json:"wwn,omitempty"` +} + +// GetOrganizationDisksPartVirtualMachine defines model for GetOrganizationDisksPartVirtualMachine. +type GetOrganizationDisksPartVirtualMachine struct { + Fqdn *string `json:"fqdn,omitempty"` + Id *string `json:"id,omitempty"` +} + +// GetOrganizationDisksPartVirtualMachineDisk defines model for GetOrganizationDisksPartVirtualMachineDisk. +type GetOrganizationDisksPartVirtualMachineDisk struct { + VirtualMachine *GetOrganizationDisksPartVirtualMachine `json:"virtual_machine,omitempty"` +} + +// GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes defines model for GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes. +type GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes struct { + Associations *[]string `json:"associations,omitempty"` + DataCenter *GetOrganizationFileStorageVolumesPartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + + // NfsLocation The NFS location of where to mount the volume from. + NfsLocation *string `json:"nfs_location"` + + // Size The size of the volume in bytes. + Size *int `json:"size"` + State *FileStorageVolumeStateEnum `json:"state,omitempty"` +} + +// GetOrganizationFileStorageVolumesPartDataCenter defines model for GetOrganizationFileStorageVolumesPartDataCenter. +type GetOrganizationFileStorageVolumesPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetOrganizationIPAddresses200ResponseIPAddresses defines model for GetOrganizationIPAddresses200ResponseIPAddresses. +type GetOrganizationIPAddresses200ResponseIPAddresses struct { + Address *string `json:"address,omitempty"` + AllocationId *string `json:"allocation_id"` + AllocationType *string `json:"allocation_type"` + Id *string `json:"id,omitempty"` + ReverseDns *string `json:"reverse_dns,omitempty"` + Vip *bool `json:"vip,omitempty"` +} + +// GetOrganizationLoadBalancers200ResponseLoadBalancers defines model for GetOrganizationLoadBalancers200ResponseLoadBalancers. +type GetOrganizationLoadBalancers200ResponseLoadBalancers struct { + ApiReference *string `json:"api_reference"` + DataCenter *GetOrganizationLoadBalancersPartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + IpAddress *GetOrganizationLoadBalancersPartIPAddress `json:"ip_address,omitempty"` + Name *string `json:"name,omitempty"` + ResourceIds *[]string `json:"resource_ids,omitempty"` + ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` + Resources *[]LoadBalancerResource `json:"resources,omitempty"` +} + +// GetOrganizationLoadBalancersPartDataCenter defines model for GetOrganizationLoadBalancersPartDataCenter. +type GetOrganizationLoadBalancersPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetOrganizationLoadBalancersPartIPAddress defines model for GetOrganizationLoadBalancersPartIPAddress. +type GetOrganizationLoadBalancersPartIPAddress struct { + Address *string `json:"address,omitempty"` +} + +// GetOrganizationManaged200ResponseOrganizations defines model for GetOrganizationManaged200ResponseOrganizations. +type GetOrganizationManaged200ResponseOrganizations struct { + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + InfrastructureDomain *string `json:"infrastructure_domain,omitempty"` + Managed *bool `json:"managed,omitempty"` + Name *string `json:"name,omitempty"` + SubDomain *string `json:"sub_domain,omitempty"` +} + +// GetOrganizationTags200ResponseTags defines model for GetOrganizationTags200ResponseTags. +type GetOrganizationTags200ResponseTags struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetOrganizationUsersWithAccess200ResponseUsers defines model for GetOrganizationUsersWithAccess200ResponseUsers. +type GetOrganizationUsersWithAccess200ResponseUsers struct { + User *User `json:"user"` +} + +// GetOrganizationVirtualMachines200ResponseVirtualMachines defines model for GetOrganizationVirtualMachines200ResponseVirtualMachines. +type GetOrganizationVirtualMachines200ResponseVirtualMachines struct { + CreatedAt *int `json:"created_at,omitempty"` + Fqdn *string `json:"fqdn,omitempty"` + GpuType *GetOrganizationVirtualMachinesPartGPUType `json:"gpu_type"` + Hostname *string `json:"hostname,omitempty"` + Id *string `json:"id,omitempty"` + IpAddresses *[]GetOrganizationVirtualMachinesPartIPAddresses `json:"ip_addresses,omitempty"` + Name *string `json:"name,omitempty"` + Package *GetOrganizationVirtualMachinesPartPackage `json:"package"` + Zone *Zone `json:"zone,omitempty"` +} + +// GetOrganizationVirtualMachinesPartGPUType defines model for GetOrganizationVirtualMachinesPartGPUType. +type GetOrganizationVirtualMachinesPartGPUType struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetOrganizationVirtualMachinesPartIPAddresses defines model for GetOrganizationVirtualMachinesPartIPAddresses. +type GetOrganizationVirtualMachinesPartIPAddresses struct { + Address *string `json:"address,omitempty"` +} + +// GetOrganizationVirtualMachinesPartPackage defines model for GetOrganizationVirtualMachinesPartPackage. +type GetOrganizationVirtualMachinesPartPackage struct { + Name *string `json:"name,omitempty"` +} + +// GetOrganizations200ResponseOrganizations defines model for GetOrganizations200ResponseOrganizations. +type GetOrganizations200ResponseOrganizations struct { + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + InfrastructureDomain *string `json:"infrastructure_domain,omitempty"` + Managed *bool `json:"managed,omitempty"` + Name *string `json:"name,omitempty"` + SubDomain *string `json:"sub_domain,omitempty"` + Suspended *bool `json:"suspended,omitempty"` +} + +// GetSecurityGroupRules200ResponseSecurityGroupRules defines model for GetSecurityGroupRules200ResponseSecurityGroupRules. +type GetSecurityGroupRules200ResponseSecurityGroupRules struct { + Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` + Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` + Id *string `json:"id,omitempty"` + Notes *string `json:"notes"` + Ports *string `json:"ports"` + Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` + Targets *[]string `json:"targets,omitempty"` +} + +// GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule defines model for GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule. +type GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule struct { + Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` + Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` + Id *string `json:"id,omitempty"` + Notes *string `json:"notes"` + Ports *string `json:"ports"` + Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` + SecurityGroup *GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup `json:"security_group,omitempty"` + Targets *[]string `json:"targets,omitempty"` +} + +// GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup defines model for GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup. +type GetSecurityGroupsRulesSecurityGroupRulePartSecurityGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetUsersCurrent200ResponseOrganizations defines model for GetUsersCurrent200ResponseOrganizations. +type GetUsersCurrent200ResponseOrganizations struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + SubDomain *string `json:"sub_domain,omitempty"` +} + +// GetVMNIVMNI200ResponseVirtualMachineNetworkInterface defines model for GetVMNIVMNI200ResponseVirtualMachineNetworkInterface. +type GetVMNIVMNI200ResponseVirtualMachineNetworkInterface struct { + Id *string `json:"id,omitempty"` + IpAddresses *[]GetVMNIVMNIPartIPAddresses `json:"ip_addresses,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` + Name *string `json:"name,omitempty"` + Network *GetVMNIVMNIPartNetwork `json:"network,omitempty"` + SpeedProfile *GetVMNIVMNIPartSpeedProfile `json:"speed_profile,omitempty"` + State *string `json:"state,omitempty"` + VirtualMachine *GetVMNIVMNIPartVirtualMachine `json:"virtual_machine,omitempty"` +} + +// GetVMNIVMNIPartIPAddresses defines model for GetVMNIVMNIPartIPAddresses. +type GetVMNIVMNIPartIPAddresses struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// GetVMNIVMNIPartNetwork defines model for GetVMNIVMNIPartNetwork. +type GetVMNIVMNIPartNetwork struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetVMNIVMNIPartSpeedProfile defines model for GetVMNIVMNIPartSpeedProfile. +type GetVMNIVMNIPartSpeedProfile struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetVMNIVMNIPartVirtualMachine defines model for GetVMNIVMNIPartVirtualMachine. +type GetVMNIVMNIPartVirtualMachine struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetVirtualMachine200ResponseVirtualMachine defines model for GetVirtualMachine200ResponseVirtualMachine. +type GetVirtualMachine200ResponseVirtualMachine struct { + AttachedIso *ISO `json:"attached_iso"` + CpuCores *int `json:"cpu_cores"` + CreatedAt *int `json:"created_at,omitempty"` + Description *string `json:"description"` + Fqdn *string `json:"fqdn,omitempty"` + GpuType *GetVirtualMachinePartGPUType `json:"gpu_type"` + Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` + Group *VirtualMachineGroup `json:"group"` + Hostname *string `json:"hostname,omitempty"` + Id *string `json:"id,omitempty"` + InitialRootPassword *string `json:"initial_root_password"` + IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` + MemoryInGb *int `json:"memory_in_gb"` + Name *string `json:"name,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Package *VirtualMachinePackage `json:"package"` + State *VirtualMachineStateEnum `json:"state,omitempty"` + TagNames *[]string `json:"tag_names,omitempty"` + Tags *[]Tag `json:"tags,omitempty"` + UseDedicatedCpus *bool `json:"use_dedicated_cpus"` + Zone *Zone `json:"zone,omitempty"` +} + +// GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies defines model for GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies. +type GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies struct { + Id *string `json:"id,omitempty"` + Retention *int `json:"retention,omitempty"` + Schedule *GetVirtualMachineDiskBackupPoliciesPartSchedule `json:"schedule,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` + TotalSize *float32 `json:"total_size,omitempty"` +} + +// GetVirtualMachineDiskBackupPoliciesPartSchedule defines model for GetVirtualMachineDiskBackupPoliciesPartSchedule. +type GetVirtualMachineDiskBackupPoliciesPartSchedule struct { + Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` + NextInvocationAt *int `json:"next_invocation_at,omitempty"` +} + +// GetVirtualMachineDisks200ResponseDisks defines model for GetVirtualMachineDisks200ResponseDisks. +type GetVirtualMachineDisks200ResponseDisks struct { + AttachOnBoot *bool `json:"attach_on_boot,omitempty"` + Boot *bool `json:"boot,omitempty"` + Disk *GetVirtualMachineDisksPartDisk `json:"disk,omitempty"` + State *VirtualMachineDiskAttachmentStateEnum `json:"state,omitempty"` +} + +// GetVirtualMachineDisksPartDisk defines model for GetVirtualMachineDisksPartDisk. +type GetVirtualMachineDisksPartDisk struct { + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + SizeInGb *int `json:"size_in_gb,omitempty"` + State *DiskStateEnum `json:"state,omitempty"` + Wwn *string `json:"wwn,omitempty"` +} + +// GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface defines model for GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface. +type GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface struct { + Id *string `json:"id,omitempty"` + IpAddresses *[]GetVirtualMachineNetworkInterfacePartIPAddresses `json:"ip_addresses,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` + Name *string `json:"name,omitempty"` + Network *GetVirtualMachineNetworkInterfacePartNetwork `json:"network,omitempty"` + State *string `json:"state,omitempty"` + VirtualMachine *GetVirtualMachineNetworkInterfacePartVirtualMachine `json:"virtual_machine,omitempty"` +} + +// GetVirtualMachineNetworkInterfacePartIPAddresses defines model for GetVirtualMachineNetworkInterfacePartIPAddresses. +type GetVirtualMachineNetworkInterfacePartIPAddresses struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// GetVirtualMachineNetworkInterfacePartNetwork defines model for GetVirtualMachineNetworkInterfacePartNetwork. +type GetVirtualMachineNetworkInterfacePartNetwork struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetVirtualMachineNetworkInterfacePartVirtualMachine defines model for GetVirtualMachineNetworkInterfacePartVirtualMachine. +type GetVirtualMachineNetworkInterfacePartVirtualMachine struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces defines model for GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces. +type GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces struct { + Id *string `json:"id,omitempty"` + IpAddresses *[]GetVirtualMachineNetworkInterfacesPartIPAddresses `json:"ip_addresses,omitempty"` + Name *string `json:"name,omitempty"` + Network *GetVirtualMachineNetworkInterfacesPartNetwork `json:"network,omitempty"` +} + +// GetVirtualMachineNetworkInterfacesPartIPAddresses defines model for GetVirtualMachineNetworkInterfacesPartIPAddresses. +type GetVirtualMachineNetworkInterfacesPartIPAddresses struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// GetVirtualMachineNetworkInterfacesPartNetwork defines model for GetVirtualMachineNetworkInterfacesPartNetwork. +type GetVirtualMachineNetworkInterfacesPartNetwork struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// GetVirtualMachinePackages200ResponseVirtualMachinePackages defines model for GetVirtualMachinePackages200ResponseVirtualMachinePackages. +type GetVirtualMachinePackages200ResponseVirtualMachinePackages struct { + CpuCores *int `json:"cpu_cores,omitempty"` + Icon *GetVirtualMachinePackagesPartIcon `json:"icon"` + Id *string `json:"id,omitempty"` + Ipv4Addresses *int `json:"ipv4_addresses,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` + Privacy *PrivacyTypesEnum `json:"privacy,omitempty"` + StorageInGb *int `json:"storage_in_gb,omitempty"` +} + +// GetVirtualMachinePackagesPartIcon defines model for GetVirtualMachinePackagesPartIcon. +type GetVirtualMachinePackagesPartIcon struct { + Url *string `json:"url,omitempty"` +} + +// GetVirtualMachinePartGPUType defines model for GetVirtualMachinePartGPUType. +type GetVirtualMachinePartGPUType struct { + Id *string `json:"id,omitempty"` + Manufacturer *string `json:"manufacturer,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MemoryType *string `json:"memory_type,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild defines model for GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild. +type GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild struct { + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + SpecXml *string `json:"spec_xml,omitempty"` + State *VirtualMachineBuildStateEnum `json:"state,omitempty"` + VirtualMachine *GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine `json:"virtual_machine"` +} + +// GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine defines model for GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine. +type GetVirtualMachinesBuildsVirtualMachineBuildPartVirtualMachine struct { + Fqdn *string `json:"fqdn,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + State *VirtualMachineStateEnum `json:"state,omitempty"` +} + +// GetZones200ResponseZones defines model for GetZones200ResponseZones. +type GetZones200ResponseZones struct { + DataCenter *GetZonesPartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// GetZonesPartDataCenter defines model for GetZonesPartDataCenter. +type GetZonesPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// IPAddress defines model for IPAddress. +type IPAddress struct { + Address *string `json:"address,omitempty"` + AddressWithMask *string `json:"address_with_mask,omitempty"` + AllocationId *string `json:"allocation_id"` + AllocationType *string `json:"allocation_type"` + Id *string `json:"id,omitempty"` + Label *string `json:"label"` + Network *Network `json:"network,omitempty"` + ReverseDns *string `json:"reverse_dns,omitempty"` + Vip *bool `json:"vip,omitempty"` +} + +// IPAddressLookup All 'ip_address[]' params are mutually exclusive, only one can be provided. +type IPAddressLookup struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// IPAddressNotFoundEnum defines model for IPAddressNotFoundEnum. +type IPAddressNotFoundEnum string + +// IPAddressNotFoundSchema No IP addresses were found matching any of the criteria provided in the arguments +type IPAddressNotFoundSchema struct { + Code *IPAddressNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// IPAddressVersionEnum defines model for IPAddressVersionEnum. +type IPAddressVersionEnum string + +// IPAlreadyAllocatedEnum defines model for IPAlreadyAllocatedEnum. +type IPAlreadyAllocatedEnum string + +// IPAlreadyAllocatedSchema This IP address has already been allocated to another resource +type IPAlreadyAllocatedSchema struct { + Code *IPAlreadyAllocatedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// ISO defines model for ISO. +type ISO struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + OperatingSystem *OperatingSystem `json:"operating_system"` +} + +// IdentityNotLinkedToWebSessionEnum defines model for IdentityNotLinkedToWebSessionEnum. +type IdentityNotLinkedToWebSessionEnum string + +// IdentityNotLinkedToWebSessionSchema The authenticated identity is not linked to a web session +type IdentityNotLinkedToWebSessionSchema struct { + Code *IdentityNotLinkedToWebSessionEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// IntegerOrUnlimited defines model for IntegerOrUnlimited. +type IntegerOrUnlimited struct { + Unlimited *bool `json:"unlimited,omitempty"` + Value *int `json:"value"` +} + +// InterfaceNotFoundEnum defines model for InterfaceNotFoundEnum. +type InterfaceNotFoundEnum string + +// InterfaceNotFoundSchema An interface could not be found for the specified network +type InterfaceNotFoundSchema struct { + Code *InterfaceNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// InvalidAPIToken defines model for InvalidAPIToken. +type InvalidAPIToken struct { + Details *string `json:"details"` +} + +// InvalidAPITokenEnum defines model for InvalidAPITokenEnum. +type InvalidAPITokenEnum string + +// InvalidAPITokenSchema The API token provided was not valid (it may not exist or have expired) +type InvalidAPITokenSchema struct { + Code *InvalidAPITokenEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *InvalidAPIToken `json:"detail,omitempty"` +} + +// InvalidIPEnum defines model for InvalidIPEnum. +type InvalidIPEnum string + +// InvalidIPSchema This IP address is not valid for this network interface. +type InvalidIPSchema struct { + Code *InvalidIPEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// InvalidSpecXML defines model for InvalidSpecXML. +type InvalidSpecXML struct { + // Errors A textual description of the errors with the provided XML + Errors *string `json:"errors,omitempty"` +} + +// InvalidSpecXMLEnum defines model for InvalidSpecXMLEnum. +type InvalidSpecXMLEnum string + +// InvalidSpecXMLSchema The spec XML provided is invalid +type InvalidSpecXMLSchema struct { + Code *InvalidSpecXMLEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *InvalidSpecXML `json:"detail,omitempty"` +} + +// InvalidTimestampEnum defines model for InvalidTimestampEnum. +type InvalidTimestampEnum string + +// InvalidTimestampSchema Timestamp must be at least 5 minutes in the future. If you want to delete something immediately, you use can use the delete endpoint. +type InvalidTimestampSchema struct { + Code *InvalidTimestampEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// IssuerEnum defines model for IssuerEnum. +type IssuerEnum string + +// KeyValue All 'disk_template_options[]' params are mutually exclusive, only one can be provided. +type KeyValue struct { + Key string `json:"key"` + Value *string `json:"value,omitempty"` +} + +// LoadBalancerArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type LoadBalancerArguments struct { + ApiReference *string `json:"api_reference,omitempty"` + + // DataCenter All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenter *DataCenterLookup `json:"data_center,omitempty"` + EnableWeighting *bool `json:"enable_weighting,omitempty"` + HttpsRedirect *bool `json:"https_redirect,omitempty"` + Name *string `json:"name,omitempty"` + ResourceIds *[]string `json:"resource_ids,omitempty"` + ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` + StandbyVms *[]string `json:"standby_vms,omitempty"` + Weights *[]LoadBalancerWeightsArguments `json:"weights,omitempty"` +} + +// LoadBalancerLookup All 'load_balancer[]' params are mutually exclusive, only one can be provided. +type LoadBalancerLookup struct { + ApiReference *string `json:"api_reference,omitempty"` + Id *string `json:"id,omitempty"` +} + +// LoadBalancerNotFoundEnum defines model for LoadBalancerNotFoundEnum. +type LoadBalancerNotFoundEnum string + +// LoadBalancerResource defines model for LoadBalancerResource. +type LoadBalancerResource struct { + Resources *LoadBalancerResource_Resources `json:"resources,omitempty"` +} + +// LoadBalancerResource_Resources defines model for LoadBalancerResource.Resources. +type LoadBalancerResource_Resources struct { + union json.RawMessage +} + +// LoadBalancerResourceTypesEnum defines model for LoadBalancerResourceTypesEnum. +type LoadBalancerResourceTypesEnum string + +// LoadBalancerRuleAlgorithmEnum defines model for LoadBalancerRuleAlgorithmEnum. +type LoadBalancerRuleAlgorithmEnum string + +// LoadBalancerRuleArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type LoadBalancerRuleArguments struct { + Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` + BackendSsl *bool `json:"backend_ssl,omitempty"` + Certificates *[]CertificateLookup `json:"certificates,omitempty"` + CheckEnabled *bool `json:"check_enabled,omitempty"` + CheckFall *int `json:"check_fall,omitempty"` + CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses,omitempty"` + CheckInterval *int `json:"check_interval,omitempty"` + CheckPath *string `json:"check_path,omitempty"` + CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol,omitempty"` + CheckRise *int `json:"check_rise,omitempty"` + CheckTimeout *int `json:"check_timeout,omitempty"` + DestinationPort *int `json:"destination_port,omitempty"` + ListenPort *int `json:"listen_port,omitempty"` + PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` + Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` + ProxyProtocol *bool `json:"proxy_protocol,omitempty"` +} + +// LoadBalancerRuleCheckProtocolEnum defines model for LoadBalancerRuleCheckProtocolEnum. +type LoadBalancerRuleCheckProtocolEnum string + +// LoadBalancerRuleHTTPStatusesEnum defines model for LoadBalancerRuleHTTPStatusesEnum. +type LoadBalancerRuleHTTPStatusesEnum string + +// LoadBalancerRuleLookup All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. +type LoadBalancerRuleLookup struct { + Id *string `json:"id,omitempty"` +} + +// LoadBalancerRuleNotFoundEnum defines model for LoadBalancerRuleNotFoundEnum. +type LoadBalancerRuleNotFoundEnum string + +// LoadBalancerRuleProtocolEnum defines model for LoadBalancerRuleProtocolEnum. +type LoadBalancerRuleProtocolEnum string + +// LoadBalancerWeight defines model for LoadBalancerWeight. +type LoadBalancerWeight struct { + VirtualMachineId *string `json:"virtual_machine_id,omitempty"` + Weight *int `json:"weight,omitempty"` +} + +// LoadBalancerWeightsArguments All 'weights[]' params are mutually exclusive, only one can be provided. +type LoadBalancerWeightsArguments struct { + VirtualMachineId *string `json:"virtual_machine_id,omitempty"` + Weight *int `json:"weight,omitempty"` +} + +// LocationRequiredEnum defines model for LocationRequiredEnum. +type LocationRequiredEnum string + +// LocationRequiredSchema A zone or a data_center argument must be provided +type LocationRequiredSchema struct { + Code *LocationRequiredEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// MissingAPITokenEnum defines model for MissingAPITokenEnum. +type MissingAPITokenEnum string + +// Network defines model for Network. +type Network struct { + DataCenter *DataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// NetworkLookup All 'network[]' params are mutually exclusive, only one can be provided. +type NetworkLookup struct { + Id *string `json:"id,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// NetworkNotFoundEnum defines model for NetworkNotFoundEnum. +type NetworkNotFoundEnum string + +// NetworkNotFoundSchema No network was found matching any of the criteria provided in the arguments +type NetworkNotFoundSchema struct { + Code *NetworkNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// NetworkSpeedProfile defines model for NetworkSpeedProfile. +type NetworkSpeedProfile struct { + DownloadSpeedInMbit *int `json:"download_speed_in_mbit"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` + UploadSpeedInMbit *int `json:"upload_speed_in_mbit"` +} + +// NetworkSpeedProfileLookup All 'speed_profile[]' params are mutually exclusive, only one can be provided. +type NetworkSpeedProfileLookup struct { + Id *string `json:"id,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// NetworkSpeedProfileNotFoundEnum defines model for NetworkSpeedProfileNotFoundEnum. +type NetworkSpeedProfileNotFoundEnum string + +// NetworkSpeedProfileNotFoundSchema No network speed profile was found matching any of the criteria provided in the arguments +type NetworkSpeedProfileNotFoundSchema struct { + Code *NetworkSpeedProfileNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// NoAllocationEnum defines model for NoAllocationEnum. +type NoAllocationEnum string + +// NoAvailableAddressesEnum defines model for NoAvailableAddressesEnum. +type NoAvailableAddressesEnum string + +// NoInterfaceAvailableEnum defines model for NoInterfaceAvailableEnum. +type NoInterfaceAvailableEnum string + +// NoInterfaceAvailableSchema This virtual machine does not have a network interface that is compatible with the provided IP address +type NoInterfaceAvailableSchema struct { + Code *NoInterfaceAvailableEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// NoUserAssociatedWithIdentityEnum defines model for NoUserAssociatedWithIdentityEnum. +type NoUserAssociatedWithIdentityEnum string + +// NoVirtualMachineForAPITokenEnum defines model for NoVirtualMachineForAPITokenEnum. +type NoVirtualMachineForAPITokenEnum string + +// ObjectInTrash defines model for ObjectInTrash. +type ObjectInTrash struct { + TrashObject *TrashObject `json:"trash_object"` +} + +// ObjectInTrashEnum defines model for ObjectInTrashEnum. +type ObjectInTrashEnum string + +// ObjectInTrashSchema The object found is in the trash and therefore cannot be manipulated through the API. It should be restored in order to run this operation. +type ObjectInTrashSchema struct { + Code *ObjectInTrashEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *ObjectInTrash `json:"detail,omitempty"` +} + +// OneOfAPIAuthenticator403Response defines model for OneOfAPIAuthenticator403Response. +type OneOfAPIAuthenticator403Response struct { + union json.RawMessage +} + +// OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res defines model for OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res. +type OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res struct { + union json.RawMessage +} + +// OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res defines model for OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res. +type OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res struct { + union json.RawMessage +} + +// OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res. +type OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res struct { + union json.RawMessage +} + +// OneOfIPAddressNotFoundVirtualMachineNotFound404Res defines model for OneOfIPAddressNotFoundVirtualMachineNotFound404Res. +type OneOfIPAddressNotFoundVirtualMachineNotFound404Res struct { + union json.RawMessage +} + +// OneOfIPAlreadyAllocatedInvalidIP422Res defines model for OneOfIPAlreadyAllocatedInvalidIP422Res. +type OneOfIPAlreadyAllocatedInvalidIP422Res struct { + union json.RawMessage +} + +// OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res defines model for OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res. +type OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res struct { + union json.RawMessage +} + +// OneOfIdentityNotLinkedToWebSession400Res defines model for OneOfIdentityNotLinkedToWebSession400Res. +type OneOfIdentityNotLinkedToWebSession400Res struct { + union json.RawMessage +} + +// OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res defines model for OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res. +type OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res struct { + union json.RawMessage +} + +// OneOfInvalidSpecXML400Res defines model for OneOfInvalidSpecXML400Res. +type OneOfInvalidSpecXML400Res struct { + union json.RawMessage +} + +// OneOfInvalidTimestamp400Res defines model for OneOfInvalidTimestamp400Res. +type OneOfInvalidTimestamp400Res struct { + union json.RawMessage +} + +// OneOfLocationRequiredValidationError422Res defines model for OneOfLocationRequiredValidationError422Res. +type OneOfLocationRequiredValidationError422Res struct { + union json.RawMessage +} + +// OneOfNetworkNotFoundOrganizationNotFound404Res defines model for OneOfNetworkNotFoundOrganizationNotFound404Res. +type OneOfNetworkNotFoundOrganizationNotFound404Res struct { + union json.RawMessage +} + +// OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res. +type OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res struct { + union json.RawMessage +} + +// OneOfObjectInTrashTaskQueueingError406Res defines model for OneOfObjectInTrashTaskQueueingError406Res. +type OneOfObjectInTrashTaskQueueingError406Res struct { + union json.RawMessage +} + +// OneOfObjectInTrashVirtualMachineMustBeStarted406Res defines model for OneOfObjectInTrashVirtualMachineMustBeStarted406Res. +type OneOfObjectInTrashVirtualMachineMustBeStarted406Res struct { + union json.RawMessage +} + +// OneOfOperatingSystemNotFoundOrganizationNotFound404Res defines model for OneOfOperatingSystemNotFoundOrganizationNotFound404Res. +type OneOfOperatingSystemNotFoundOrganizationNotFound404Res struct { + union json.RawMessage +} + +// OneOfOrganizationLimitReachedValidationError422Res defines model for OneOfOrganizationLimitReachedValidationError422Res. +type OneOfOrganizationLimitReachedValidationError422Res struct { + union json.RawMessage +} + +// OneOfOrganizationNotActivatedOrganizationSuspended403Res defines model for OneOfOrganizationNotActivatedOrganizationSuspended403Res. +type OneOfOrganizationNotActivatedOrganizationSuspended403Res struct { + union json.RawMessage +} + +// OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res defines model for OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res. +type OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res struct { + union json.RawMessage +} + +// OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res defines model for OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res. +type OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res struct { + union json.RawMessage +} + +// OneOfPermissionDenied403Res defines model for OneOfPermissionDenied403Res. +type OneOfPermissionDenied403Res struct { + union json.RawMessage +} + +// OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res defines model for OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res. +type OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res struct { + union json.RawMessage +} + +// OperatingSystem defines model for OperatingSystem. +type OperatingSystem struct { + Badge *Attachment `json:"badge"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// OperatingSystemNotFoundEnum defines model for OperatingSystemNotFoundEnum. +type OperatingSystemNotFoundEnum string + +// OperatingSystemNotFoundSchema No operating system was found matching any of the criteria provided in the arguments +type OperatingSystemNotFoundSchema struct { + Code *OperatingSystemNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// Organization defines model for Organization. +type Organization struct { + Address1 *string `json:"address1"` + Address2 *string `json:"address2"` + Address3 *string `json:"address3"` + Address4 *string `json:"address4"` + BillingName *string `json:"billing_name"` + Country *Country `json:"country"` + CountryState *CountryState `json:"country_state"` + CreatedAt *int `json:"created_at,omitempty"` + Currency *Currency `json:"currency,omitempty"` + Id *string `json:"id,omitempty"` + InfrastructureDomain *string `json:"infrastructure_domain,omitempty"` + Managed *bool `json:"managed,omitempty"` + Name *string `json:"name,omitempty"` + PhoneNumber *string `json:"phone_number"` + Postcode *string `json:"postcode"` + SubDomain *string `json:"sub_domain,omitempty"` + Suspended *bool `json:"suspended,omitempty"` + VatNumber *string `json:"vat_number"` +} + +// OrganizationLimitReachedEnum defines model for OrganizationLimitReachedEnum. +type OrganizationLimitReachedEnum string + +// OrganizationLimitReachedSchema The maxmium number of organizations that can be created has been reached +type OrganizationLimitReachedSchema struct { + Code *OrganizationLimitReachedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// OrganizationLookup All 'organization[]' params are mutually exclusive, only one can be provided. +type OrganizationLookup struct { + Id *string `json:"id,omitempty"` + SubDomain *string `json:"sub_domain,omitempty"` +} + +// OrganizationNotActivatedEnum defines model for OrganizationNotActivatedEnum. +type OrganizationNotActivatedEnum string + +// OrganizationNotActivatedSchema An organization was found from the arguments provided but it wasn't activated yet +type OrganizationNotActivatedSchema struct { + Code *OrganizationNotActivatedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// OrganizationNotFoundEnum defines model for OrganizationNotFoundEnum. +type OrganizationNotFoundEnum string + +// OrganizationNotFoundSchema No organization was found matching any of the criteria provided in the arguments +type OrganizationNotFoundSchema struct { + Code *OrganizationNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// OrganizationPolicy defines model for OrganizationPolicy. +type OrganizationPolicy struct { + AllowRestrictedTrafficTypes *bool `json:"allow_restricted_traffic_types,omitempty"` + AllowSuspension *bool `json:"allow_suspension,omitempty"` + FlexibleVirtualMachineResources *bool `json:"flexible_virtual_machine_resources,omitempty"` + MaximumCertificates *IntegerOrUnlimited `json:"maximum_certificates,omitempty"` + MaximumDiskSpace *IntegerOrUnlimited `json:"maximum_disk_space,omitempty"` + MaximumDnsZones *IntegerOrUnlimited `json:"maximum_dns_zones,omitempty"` + MaximumFileStorageVolumes *IntegerOrUnlimited `json:"maximum_file_storage_volumes,omitempty"` + MaximumIsos *IntegerOrUnlimited `json:"maximum_isos,omitempty"` + MaximumLoadBalancers *IntegerOrUnlimited `json:"maximum_load_balancers,omitempty"` + MaximumManagedOrganizations *IntegerOrUnlimited `json:"maximum_managed_organizations,omitempty"` + MaximumSecurityGroups *IntegerOrUnlimited `json:"maximum_security_groups,omitempty"` + MaximumUnallocatedIpAddresses *IntegerOrUnlimited `json:"maximum_unallocated_ip_addresses,omitempty"` + MaximumUninvoicedBalance *DecimalOrUnlimited `json:"maximum_uninvoiced_balance,omitempty"` + MaximumVirtualMachineMemory *IntegerOrUnlimited `json:"maximum_virtual_machine_memory,omitempty"` + MaximumVirtualMachines *IntegerOrUnlimited `json:"maximum_virtual_machines,omitempty"` + MaximumVirtualNetworks *IntegerOrUnlimited `json:"maximum_virtual_networks,omitempty"` +} + +// OrganizationSuspendedEnum defines model for OrganizationSuspendedEnum. +type OrganizationSuspendedEnum string + +// OrganizationSuspendedSchema An organization was found from the arguments provided but it was suspended +type OrganizationSuspendedSchema struct { + Code *OrganizationSuspendedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// PaginationObject defines model for PaginationObject. +type PaginationObject struct { + // CurrentPage The current page + CurrentPage *int `json:"current_page,omitempty"` + + // LargeSet Is this a large set and therefore the total number of records cannot be returned? + LargeSet *bool `json:"large_set,omitempty"` + + // PerPage The number of items per page + PerPage *int `json:"per_page,omitempty"` + + // Total The total number of items across all pages + Total *int `json:"total"` + + // TotalPages The total number of pages + TotalPages *int `json:"total_pages"` +} + +// PatchDiskBackupPolicy200ResponseDiskBackupPolicy defines model for PatchDiskBackupPolicy200ResponseDiskBackupPolicy. +type PatchDiskBackupPolicy200ResponseDiskBackupPolicy struct { + Id *string `json:"id,omitempty"` + Retention *int `json:"retention,omitempty"` + Schedule *map[string]interface{} `json:"schedule,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` +} + +// PatchFileStorageVolume200ResponseFileStorageVolume defines model for PatchFileStorageVolume200ResponseFileStorageVolume. +type PatchFileStorageVolume200ResponseFileStorageVolume struct { + Associations *[]string `json:"associations,omitempty"` + DataCenter *PatchFileStorageVolumePartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + + // NfsLocation The NFS location of where to mount the volume from. + NfsLocation *string `json:"nfs_location"` + + // Size The size of the volume in bytes. + Size *int `json:"size"` + State *FileStorageVolumeStateEnum `json:"state,omitempty"` +} + +// PatchFileStorageVolumePartDataCenter defines model for PatchFileStorageVolumePartDataCenter. +type PatchFileStorageVolumePartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// PatchLoadBalancer200ResponseLoadBalancer defines model for PatchLoadBalancer200ResponseLoadBalancer. +type PatchLoadBalancer200ResponseLoadBalancer struct { + ApiReference *string `json:"api_reference"` + BackendCertificate *string `json:"backend_certificate,omitempty"` + BackendCertificateKey *string `json:"backend_certificate_key,omitempty"` + DataCenter *PatchLoadBalancerPartDataCenter `json:"data_center,omitempty"` + EnableWeighting *bool `json:"enable_weighting,omitempty"` + HttpsRedirect *bool `json:"https_redirect,omitempty"` + Id *string `json:"id,omitempty"` + IpAddress *PatchLoadBalancerPartIPAddress `json:"ip_address,omitempty"` + Name *string `json:"name,omitempty"` + ResourceIds *[]string `json:"resource_ids,omitempty"` + ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` + Resources *[]LoadBalancerResource `json:"resources,omitempty"` + StandbyVms *[]string `json:"standby_vms,omitempty"` + Weights *[]LoadBalancerWeight `json:"weights,omitempty"` +} + +// PatchLoadBalancerPartDataCenter defines model for PatchLoadBalancerPartDataCenter. +type PatchLoadBalancerPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// PatchLoadBalancerPartIPAddress defines model for PatchLoadBalancerPartIPAddress. +type PatchLoadBalancerPartIPAddress struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule defines model for PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule. +type PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule struct { + Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` + BackendSsl *bool `json:"backend_ssl,omitempty"` + Certificates *[]PatchLoadBalancersRulesLoadBalancerRulePartCertificates `json:"certificates,omitempty"` + CheckEnabled *bool `json:"check_enabled,omitempty"` + CheckFall *int `json:"check_fall,omitempty"` + CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses"` + CheckInterval *int `json:"check_interval,omitempty"` + CheckPath *string `json:"check_path,omitempty"` + CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol"` + CheckRise *int `json:"check_rise,omitempty"` + CheckTimeout *int `json:"check_timeout,omitempty"` + DestinationPort *int `json:"destination_port,omitempty"` + Id *string `json:"id,omitempty"` + ListenPort *int `json:"listen_port,omitempty"` + LoadBalancer *PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer `json:"load_balancer,omitempty"` + PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` + Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` + ProxyProtocol *bool `json:"proxy_protocol,omitempty"` +} + +// PatchLoadBalancersRulesLoadBalancerRulePartCertificates defines model for PatchLoadBalancersRulesLoadBalancerRulePartCertificates. +type PatchLoadBalancersRulesLoadBalancerRulePartCertificates struct { + AdditionalNames *[]string `json:"additional_names,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + State *CertificateStateEnum `json:"state,omitempty"` +} + +// PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer defines model for PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer. +type PatchLoadBalancersRulesLoadBalancerRulePartLoadBalancer struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule defines model for PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule. +type PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule struct { + Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` + Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` + Id *string `json:"id,omitempty"` + Notes *string `json:"notes"` + Ports *string `json:"ports"` + Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` + SecurityGroup *PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup `json:"security_group,omitempty"` + Targets *[]string `json:"targets,omitempty"` +} + +// PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup defines model for PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup. +type PatchSecurityGroupsRulesSecurityGroupRulePartSecurityGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// PatchVirtualMachine200ResponseVirtualMachine defines model for PatchVirtualMachine200ResponseVirtualMachine. +type PatchVirtualMachine200ResponseVirtualMachine struct { + AttachedIso *ISO `json:"attached_iso"` + CpuCores *int `json:"cpu_cores"` + CreatedAt *int `json:"created_at,omitempty"` + Description *string `json:"description"` + Fqdn *string `json:"fqdn,omitempty"` + GpuType *PatchVirtualMachinePartGPUType `json:"gpu_type"` + Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` + Group *VirtualMachineGroup `json:"group"` + Hostname *string `json:"hostname,omitempty"` + Id *string `json:"id,omitempty"` + InitialRootPassword *string `json:"initial_root_password"` + IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` + MemoryInGb *int `json:"memory_in_gb"` + Name *string `json:"name,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Package *VirtualMachinePackage `json:"package"` + State *VirtualMachineStateEnum `json:"state,omitempty"` + TagNames *[]string `json:"tag_names,omitempty"` + Tags *[]Tag `json:"tags,omitempty"` + UseDedicatedCpus *bool `json:"use_dedicated_cpus"` + Zone *Zone `json:"zone,omitempty"` +} + +// PatchVirtualMachinePartGPUType defines model for PatchVirtualMachinePartGPUType. +type PatchVirtualMachinePartGPUType struct { + Id *string `json:"id,omitempty"` + Manufacturer *string `json:"manufacturer,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MemoryType *string `json:"memory_type,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// PermissionDenied defines model for PermissionDenied. +type PermissionDenied struct { + // Details Additional information regarding the reason why permission was denied + Details *string `json:"details"` +} + +// PermissionDeniedEnum defines model for PermissionDeniedEnum. +type PermissionDeniedEnum string + +// PermissionDeniedSchema The authenticated identity is not permitted to perform this action +type PermissionDeniedSchema struct { + Code *PermissionDeniedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *PermissionDenied `json:"detail,omitempty"` +} + +// PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy defines model for PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy. +type PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy struct { + AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` + Id *string `json:"id,omitempty"` + Retention *int `json:"retention,omitempty"` + Schedule *Schedule `json:"schedule,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` + TotalSize *float32 `json:"total_size,omitempty"` +} + +// PostLoadBalancerRules200ResponseLoadBalancerRule defines model for PostLoadBalancerRules200ResponseLoadBalancerRule. +type PostLoadBalancerRules200ResponseLoadBalancerRule struct { + Algorithm *LoadBalancerRuleAlgorithmEnum `json:"algorithm,omitempty"` + BackendSsl *bool `json:"backend_ssl,omitempty"` + Certificates *[]PostLoadBalancerRulesPartCertificates `json:"certificates,omitempty"` + CheckEnabled *bool `json:"check_enabled,omitempty"` + CheckFall *int `json:"check_fall,omitempty"` + CheckHttpStatuses *LoadBalancerRuleHTTPStatusesEnum `json:"check_http_statuses"` + CheckInterval *int `json:"check_interval,omitempty"` + CheckPath *string `json:"check_path,omitempty"` + CheckProtocol *LoadBalancerRuleCheckProtocolEnum `json:"check_protocol"` + CheckRise *int `json:"check_rise,omitempty"` + CheckTimeout *int `json:"check_timeout,omitempty"` + DestinationPort *int `json:"destination_port,omitempty"` + Id *string `json:"id,omitempty"` + ListenPort *int `json:"listen_port,omitempty"` + LoadBalancer *PostLoadBalancerRulesPartLoadBalancer `json:"load_balancer,omitempty"` + PassthroughSsl *bool `json:"passthrough_ssl,omitempty"` + Protocol *LoadBalancerRuleProtocolEnum `json:"protocol,omitempty"` + ProxyProtocol *bool `json:"proxy_protocol,omitempty"` +} + +// PostLoadBalancerRulesPartCertificates defines model for PostLoadBalancerRulesPartCertificates. +type PostLoadBalancerRulesPartCertificates struct { + AdditionalNames *[]string `json:"additional_names,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + State *CertificateStateEnum `json:"state,omitempty"` +} + +// PostLoadBalancerRulesPartLoadBalancer defines model for PostLoadBalancerRulesPartLoadBalancer. +type PostLoadBalancerRulesPartLoadBalancer struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// PostOrganizationFileStorageVolumes201ResponseFileStorageVolume defines model for PostOrganizationFileStorageVolumes201ResponseFileStorageVolume. +type PostOrganizationFileStorageVolumes201ResponseFileStorageVolume struct { + Associations *[]string `json:"associations,omitempty"` + DataCenter *PostOrganizationFileStorageVolumesPartDataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + + // NfsLocation The NFS location of where to mount the volume from. + NfsLocation *string `json:"nfs_location"` + + // Size The size of the volume in bytes. + Size *int `json:"size"` + State *FileStorageVolumeStateEnum `json:"state,omitempty"` +} + +// PostOrganizationFileStorageVolumesPartDataCenter defines model for PostOrganizationFileStorageVolumesPartDataCenter. +type PostOrganizationFileStorageVolumesPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// PostOrganizationLoadBalancers200ResponseLoadBalancer defines model for PostOrganizationLoadBalancers200ResponseLoadBalancer. +type PostOrganizationLoadBalancers200ResponseLoadBalancer struct { + ApiReference *string `json:"api_reference"` + BackendCertificate *string `json:"backend_certificate,omitempty"` + BackendCertificateKey *string `json:"backend_certificate_key,omitempty"` + DataCenter *PostOrganizationLoadBalancersPartDataCenter `json:"data_center,omitempty"` + EnableWeighting *bool `json:"enable_weighting,omitempty"` + HttpsRedirect *bool `json:"https_redirect,omitempty"` + Id *string `json:"id,omitempty"` + IpAddress *PostOrganizationLoadBalancersPartIPAddress `json:"ip_address,omitempty"` + Name *string `json:"name,omitempty"` + ResourceIds *[]string `json:"resource_ids,omitempty"` + ResourceType *LoadBalancerResourceTypesEnum `json:"resource_type,omitempty"` + Resources *[]LoadBalancerResource `json:"resources,omitempty"` + StandbyVms *[]string `json:"standby_vms,omitempty"` + Weights *[]LoadBalancerWeight `json:"weights,omitempty"` +} + +// PostOrganizationLoadBalancersPartDataCenter defines model for PostOrganizationLoadBalancersPartDataCenter. +type PostOrganizationLoadBalancersPartDataCenter struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// PostOrganizationLoadBalancersPartIPAddress defines model for PostOrganizationLoadBalancersPartIPAddress. +type PostOrganizationLoadBalancersPartIPAddress struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// PostOrganizationVirtualMachinesBuild201ResponseBuild defines model for PostOrganizationVirtualMachinesBuild201ResponseBuild. +type PostOrganizationVirtualMachinesBuild201ResponseBuild struct { + Id *string `json:"id,omitempty"` + State *VirtualMachineBuildStateEnum `json:"state,omitempty"` +} + +// PostOrganizationVirtualMachinesBuild201ResponseTask defines model for PostOrganizationVirtualMachinesBuild201ResponseTask. +type PostOrganizationVirtualMachinesBuild201ResponseTask struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *TaskStatusEnum `json:"status,omitempty"` +} + +// PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild defines model for PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild. +type PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild struct { + Id *string `json:"id,omitempty"` + State *VirtualMachineBuildStateEnum `json:"state,omitempty"` +} + +// PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild defines model for PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild. +type PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild struct { + Id *string `json:"id,omitempty"` + State *VirtualMachineBuildStateEnum `json:"state,omitempty"` +} + +// PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask defines model for PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask. +type PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *TaskStatusEnum `json:"status,omitempty"` +} + +// PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild defines model for PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild. +type PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild struct { + Id *string `json:"id,omitempty"` + State *VirtualMachineBuildStateEnum `json:"state,omitempty"` +} + +// PostSecurityGroupRules200ResponseSecurityGroupRule defines model for PostSecurityGroupRules200ResponseSecurityGroupRule. +type PostSecurityGroupRules200ResponseSecurityGroupRule struct { + Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` + Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` + Id *string `json:"id,omitempty"` + Notes *string `json:"notes"` + Ports *string `json:"ports"` + Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` + SecurityGroup *PostSecurityGroupRulesPartSecurityGroup `json:"security_group,omitempty"` + Targets *[]string `json:"targets,omitempty"` +} + +// PostSecurityGroupRulesPartSecurityGroup defines model for PostSecurityGroupRulesPartSecurityGroup. +type PostSecurityGroupRulesPartSecurityGroup struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// PostVirtualMachineConsoleSessions201ResponseConsoleSession defines model for PostVirtualMachineConsoleSessions201ResponseConsoleSession. +type PostVirtualMachineConsoleSessions201ResponseConsoleSession struct { + ExpiresAt *int `json:"expires_at,omitempty"` + Id *string `json:"id,omitempty"` + Url *string `json:"url,omitempty"` + VirtualMachine *PostVirtualMachineConsoleSessionsPartVirtualMachine `json:"virtual_machine,omitempty"` +} + +// PostVirtualMachineConsoleSessionsPartVirtualMachine defines model for PostVirtualMachineConsoleSessionsPartVirtualMachine. +type PostVirtualMachineConsoleSessionsPartVirtualMachine struct { + Fqdn *string `json:"fqdn,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + State *VirtualMachineStateEnum `json:"state,omitempty"` +} + +// PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy defines model for PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy. +type PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy struct { + AutoMoveToTrashAt *int `json:"auto_move_to_trash_at"` + Id *string `json:"id,omitempty"` + Retention *int `json:"retention,omitempty"` + Schedule *Schedule `json:"schedule,omitempty"` + Target *DiskBackupPolicyTarget `json:"target,omitempty"` + TotalSize *float32 `json:"total_size,omitempty"` +} + +// PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface defines model for PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface. +type PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface struct { + Id *string `json:"id,omitempty"` + IpAddresses *[]PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses `json:"ip_addresses,omitempty"` + MacAddress *string `json:"mac_address,omitempty"` + Name *string `json:"name,omitempty"` + Network *PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork `json:"network,omitempty"` + State *string `json:"state,omitempty"` + VirtualMachine *PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine `json:"virtual_machine,omitempty"` +} + +// PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses defines model for PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses. +type PostVirtualMachineNetworkInterfaceAllocateIPPartIPAddresses struct { + Address *string `json:"address,omitempty"` + Id *string `json:"id,omitempty"` +} + +// PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork defines model for PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork. +type PostVirtualMachineNetworkInterfaceAllocateIPPartNetwork struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine defines model for PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine. +type PostVirtualMachineNetworkInterfaceAllocateIPPartVirtualMachine struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// PostVirtualMachineReset200ResponseTask defines model for PostVirtualMachineReset200ResponseTask. +type PostVirtualMachineReset200ResponseTask struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *TaskStatusEnum `json:"status,omitempty"` +} + +// PostVirtualMachineShutdown200ResponseTask defines model for PostVirtualMachineShutdown200ResponseTask. +type PostVirtualMachineShutdown200ResponseTask struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *TaskStatusEnum `json:"status,omitempty"` +} + +// PostVirtualMachineStart200ResponseTask defines model for PostVirtualMachineStart200ResponseTask. +type PostVirtualMachineStart200ResponseTask struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *TaskStatusEnum `json:"status,omitempty"` +} + +// PostVirtualMachineStop200ResponseTask defines model for PostVirtualMachineStop200ResponseTask. +type PostVirtualMachineStop200ResponseTask struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Status *TaskStatusEnum `json:"status,omitempty"` +} + +// PrivacyTypesEnum defines model for PrivacyTypesEnum. +type PrivacyTypesEnum string + +// RateLimitReached defines model for RateLimitReached. +type RateLimitReached struct { + // TotalPermitted The total number of requests per minute that are permitted + TotalPermitted *int `json:"total_permitted,omitempty"` +} + +// RateLimitReachedEnum defines model for RateLimitReachedEnum. +type RateLimitReachedEnum string + +// RecordContentAttributesForA defines model for RecordContentAttributesForA. +type RecordContentAttributesForA struct { + IpAddress *string `json:"ip_address"` +} + +// RecordContentAttributesForAAAA defines model for RecordContentAttributesForAAAA. +type RecordContentAttributesForAAAA struct { + IpAddress *string `json:"ip_address"` +} + +// RecordContentAttributesForALIAS defines model for RecordContentAttributesForALIAS. +type RecordContentAttributesForALIAS struct { + Hostname *string `json:"hostname"` +} + +// RecordContentAttributesForCAA defines model for RecordContentAttributesForCAA. +type RecordContentAttributesForCAA struct { + Flag *string `json:"flag"` + Tag *string `json:"tag"` + Value *string `json:"value"` +} + +// RecordContentAttributesForCNAME defines model for RecordContentAttributesForCNAME. +type RecordContentAttributesForCNAME struct { + Hostname *string `json:"hostname"` +} + +// RecordContentAttributesForIPS defines model for RecordContentAttributesForIPS. +type RecordContentAttributesForIPS struct { + IpAddresses *string `json:"ip_addresses"` +} + +// RecordContentAttributesForMX defines model for RecordContentAttributesForMX. +type RecordContentAttributesForMX struct { + Hostname *string `json:"hostname"` +} + +// RecordContentAttributesForNS defines model for RecordContentAttributesForNS. +type RecordContentAttributesForNS struct { + Hostname *string `json:"hostname"` +} + +// RecordContentAttributesForPTR defines model for RecordContentAttributesForPTR. +type RecordContentAttributesForPTR struct { + Hostname *string `json:"hostname"` +} + +// RecordContentAttributesForSRV defines model for RecordContentAttributesForSRV. +type RecordContentAttributesForSRV struct { + Port *string `json:"port"` + Target *string `json:"target"` + Weight *string `json:"weight"` +} + +// RecordContentAttributesForSSHFP defines model for RecordContentAttributesForSSHFP. +type RecordContentAttributesForSSHFP struct { + Algorithm *string `json:"algorithm"` + Fingerprint *string `json:"fingerprint"` + FingerprintType *string `json:"fingerprint_type"` +} + +// RecordContentAttributesForTXT defines model for RecordContentAttributesForTXT. +type RecordContentAttributesForTXT struct { + Content *string `json:"content"` +} + +// RecordContentAttributesForVirtualMachine defines model for RecordContentAttributesForVirtualMachine. +type RecordContentAttributesForVirtualMachine struct { + VirtualMachine *string `json:"virtual_machine"` +} + +// ResourceCreationRestricted defines model for ResourceCreationRestricted. +type ResourceCreationRestricted struct { + Errors *[]string `json:"errors,omitempty"` +} + +// ResourceCreationRestrictedEnum defines model for ResourceCreationRestrictedEnum. +type ResourceCreationRestrictedEnum string + +// ResourceCreationRestrictedSchema The organization chosen is not permitted to create resources +type ResourceCreationRestrictedSchema struct { + Code *ResourceCreationRestrictedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *ResourceCreationRestricted `json:"detail,omitempty"` +} + +// ResourceDoesNotSupportUnallocationEnum defines model for ResourceDoesNotSupportUnallocationEnum. +type ResourceDoesNotSupportUnallocationEnum string + +// SSHKeyNotFoundEnum defines model for SSHKeyNotFoundEnum. +type SSHKeyNotFoundEnum string + +// Schedule defines model for Schedule. +type Schedule struct { + Frequency *int `json:"frequency,omitempty"` + Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` + Minute *int `json:"minute,omitempty"` + NextInvocationAt *int `json:"next_invocation_at,omitempty"` + Time *int `json:"time,omitempty"` +} + +// ScheduleArguments All 'schedule[]' params are mutually exclusive, only one can be provided. +type ScheduleArguments struct { + Frequency *int `json:"frequency,omitempty"` + Interval *ScheduleIntervalTypeEnum `json:"interval,omitempty"` + Minute *int `json:"minute,omitempty"` + Time *int `json:"time,omitempty"` +} + +// ScheduleIntervalTypeEnum defines model for ScheduleIntervalTypeEnum. +type ScheduleIntervalTypeEnum string + +// ScopeNotGrantedError defines model for ScopeNotGrantedError. +type ScopeNotGrantedError struct { + Scopes *[]string `json:"scopes,omitempty"` +} + +// ScopeNotGrantedErrorEnum defines model for ScopeNotGrantedErrorEnum. +type ScopeNotGrantedErrorEnum string + +// ScopeNotGrantedErrorSchema The scope required for this endpoint has not been granted to the authenticating identity +type ScopeNotGrantedErrorSchema struct { + Code *ScopeNotGrantedErrorEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *ScopeNotGrantedError `json:"detail,omitempty"` +} + +// SecurityGroup defines model for SecurityGroup. +type SecurityGroup struct { + AllowAllInbound *bool `json:"allow_all_inbound,omitempty"` + AllowAllOutbound *bool `json:"allow_all_outbound,omitempty"` + Associations *[]string `json:"associations,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// SecurityGroupArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type SecurityGroupArguments struct { + AllowAllInbound *bool `json:"allow_all_inbound,omitempty"` + AllowAllOutbound *bool `json:"allow_all_outbound,omitempty"` + Associations *[]string `json:"associations,omitempty"` + Name *string `json:"name,omitempty"` +} + +// SecurityGroupLookup All 'security_group[]' params are mutually exclusive, only one can be provided. +type SecurityGroupLookup struct { + Id *string `json:"id,omitempty"` +} + +// SecurityGroupNotFoundEnum defines model for SecurityGroupNotFoundEnum. +type SecurityGroupNotFoundEnum string + +// SecurityGroupRuleActionEnum defines model for SecurityGroupRuleActionEnum. +type SecurityGroupRuleActionEnum string + +// SecurityGroupRuleArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type SecurityGroupRuleArguments struct { + Action *SecurityGroupRuleActionEnum `json:"action,omitempty"` + Direction *SecurityGroupRuleDirectionEnum `json:"direction,omitempty"` + Notes *string `json:"notes,omitempty"` + + // Ports Either single port (ie. 80), multi-port (ie. 80,443) or range (ie. 2000-3000). + Ports *string `json:"ports,omitempty"` + Protocol *SecurityGroupRuleProtocolEnum `json:"protocol,omitempty"` + Targets *[]string `json:"targets,omitempty"` +} + +// SecurityGroupRuleDirectionEnum defines model for SecurityGroupRuleDirectionEnum. +type SecurityGroupRuleDirectionEnum string + +// SecurityGroupRuleLookup All 'security_group_rule[]' params are mutually exclusive, only one can be provided. +type SecurityGroupRuleLookup struct { + Id *string `json:"id,omitempty"` +} + +// SecurityGroupRuleNotFoundEnum defines model for SecurityGroupRuleNotFoundEnum. +type SecurityGroupRuleNotFoundEnum string + +// SecurityGroupRuleProtocolEnum defines model for SecurityGroupRuleProtocolEnum. +type SecurityGroupRuleProtocolEnum string + +// SpeedProfileAlreadyAssignedEnum defines model for SpeedProfileAlreadyAssignedEnum. +type SpeedProfileAlreadyAssignedEnum string + +// StorageSpeedEnum defines model for StorageSpeedEnum. +type StorageSpeedEnum string + +// Tag defines model for Tag. +type Tag struct { + Color *TagColorsEnum `json:"color,omitempty"` + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` +} + +// TagArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type TagArguments struct { + Color *TagColorsEnum `json:"color,omitempty"` + Name *string `json:"name,omitempty"` +} + +// TagColorsEnum defines model for TagColorsEnum. +type TagColorsEnum string + +// TagLookup All 'tag[]' params are mutually exclusive, only one can be provided. +type TagLookup struct { + Id *string `json:"id,omitempty"` +} + +// TagNotFoundEnum defines model for TagNotFoundEnum. +type TagNotFoundEnum string + +// Task defines model for Task. +type Task struct { + CreatedAt *int `json:"created_at,omitempty"` + FinishedAt *int `json:"finished_at"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Progress *int `json:"progress,omitempty"` + StartedAt *int `json:"started_at"` + Status *TaskStatusEnum `json:"status,omitempty"` +} + +// TaskNotFoundEnum defines model for TaskNotFoundEnum. +type TaskNotFoundEnum string + +// TaskQueueingError defines model for TaskQueueingError. +type TaskQueueingError struct { + Details *string `json:"details,omitempty"` +} + +// TaskQueueingErrorEnum defines model for TaskQueueingErrorEnum. +type TaskQueueingErrorEnum string + +// TaskQueueingErrorSchema This error means that a background task that was needed to complete your request could not be queued +type TaskQueueingErrorSchema struct { + Code *TaskQueueingErrorEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *TaskQueueingError `json:"detail,omitempty"` +} + +// TaskStatusEnum defines model for TaskStatusEnum. +type TaskStatusEnum string + +// TemplateSpec defines model for TemplateSpec. +type TemplateSpec struct { + Fields *[]TemplateSpecField `json:"fields,omitempty"` +} + +// TemplateSpecField defines model for TemplateSpecField. +type TemplateSpecField struct { + Description *string `json:"description"` + Label *string `json:"label,omitempty"` + Name *string `json:"name,omitempty"` + Placeholder *string `json:"placeholder"` + Prefill *string `json:"prefill"` + Required *bool `json:"required,omitempty"` + Type *TemplateSpecFieldTypeEnum `json:"type,omitempty"` +} + +// TemplateSpecFieldTypeEnum defines model for TemplateSpecFieldTypeEnum. +type TemplateSpecFieldTypeEnum string + +// TrashObject defines model for TrashObject. +type TrashObject struct { + Id *string `json:"id,omitempty"` + KeepUntil *int `json:"keep_until,omitempty"` + ObjectId *string `json:"object_id,omitempty"` + ObjectType *string `json:"object_type,omitempty"` +} + +// TrashObjectLookup All 'trash_object[]' params are mutually exclusive, only one can be provided. +type TrashObjectLookup struct { + Id *string `json:"id,omitempty"` + ObjectId *string `json:"object_id,omitempty"` +} + +// TrashObjectNotFoundEnum defines model for TrashObjectNotFoundEnum. +type TrashObjectNotFoundEnum string + +// UnauthorizedNetworkForAPIToken defines model for UnauthorizedNetworkForAPIToken. +type UnauthorizedNetworkForAPIToken struct { + // IpAddress The IP address the request was received from + IpAddress *string `json:"ip_address,omitempty"` +} + +// UnauthorizedNetworkForAPITokenEnum defines model for UnauthorizedNetworkForAPITokenEnum. +type UnauthorizedNetworkForAPITokenEnum string + +// UnauthorizedNetworkForAPITokenSchema Network is not allowed to access the API with this API token +type UnauthorizedNetworkForAPITokenSchema struct { + Code *UnauthorizedNetworkForAPITokenEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *UnauthorizedNetworkForAPIToken `json:"detail,omitempty"` +} + +// User defines model for User. +type User struct { + AvatarUrl *string `json:"avatar_url,omitempty"` + FirstName *string `json:"first_name,omitempty"` + Id *string `json:"id,omitempty"` + LastName *string `json:"last_name,omitempty"` +} + +// ValidationError defines model for ValidationError. +type ValidationError struct { + Errors *[]string `json:"errors,omitempty"` +} + +// ValidationErrorEnum defines model for ValidationErrorEnum. +type ValidationErrorEnum string + +// ValidationErrorSchema A validation error occurred with the object that was being created/updated/deleted +type ValidationErrorSchema struct { + Code *ValidationErrorEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *ValidationError `json:"detail,omitempty"` +} + +// VirtualMachine defines model for VirtualMachine. +type VirtualMachine struct { + AttachedIso *ISO `json:"attached_iso"` + CpuCores *int `json:"cpu_cores"` + CreatedAt *int `json:"created_at,omitempty"` + Description *string `json:"description"` + Fqdn *string `json:"fqdn,omitempty"` + GpuType *GPUType `json:"gpu_type"` + Gpus *[]VirtualMachineGPU `json:"gpus,omitempty"` + Group *VirtualMachineGroup `json:"group"` + Hostname *string `json:"hostname,omitempty"` + Id *string `json:"id,omitempty"` + InitialRootPassword *string `json:"initial_root_password"` + IpAddresses *[]IPAddress `json:"ip_addresses,omitempty"` + MemoryInGb *int `json:"memory_in_gb"` + Name *string `json:"name,omitempty"` + Organization *Organization `json:"organization,omitempty"` + Package *VirtualMachinePackage `json:"package"` + State *VirtualMachineStateEnum `json:"state,omitempty"` + TagNames *[]string `json:"tag_names,omitempty"` + Tags *[]Tag `json:"tags,omitempty"` + UseDedicatedCpus *bool `json:"use_dedicated_cpus"` + Zone *Zone `json:"zone,omitempty"` +} + +// VirtualMachineArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type VirtualMachineArguments struct { + Description *string `json:"description,omitempty"` + + // GpuType All 'gpu_type[]' params are mutually exclusive, only one can be provided. + GpuType *GPUTypeLookup `json:"gpu_type,omitempty"` + + // Group All 'group[]' params are mutually exclusive, only one can be provided. + Group *VirtualMachineGroupLookup `json:"group,omitempty"` + Hostname *string `json:"hostname,omitempty"` + Name *string `json:"name,omitempty"` + TagNames *[]string `json:"tag_names,omitempty"` +} + +// VirtualMachineBuildNotFoundEnum defines model for VirtualMachineBuildNotFoundEnum. +type VirtualMachineBuildNotFoundEnum string + +// VirtualMachineBuildStateEnum defines model for VirtualMachineBuildStateEnum. +type VirtualMachineBuildStateEnum string + +// VirtualMachineDisk defines model for VirtualMachineDisk. +type VirtualMachineDisk struct { + AttachOnBoot *bool `json:"attach_on_boot,omitempty"` + Boot *bool `json:"boot,omitempty"` + Disk *Disk `json:"disk,omitempty"` + State *VirtualMachineDiskAttachmentStateEnum `json:"state,omitempty"` + VirtualMachine *VirtualMachine `json:"virtual_machine,omitempty"` +} + +// VirtualMachineDiskAttachmentStateEnum defines model for VirtualMachineDiskAttachmentStateEnum. +type VirtualMachineDiskAttachmentStateEnum string + +// VirtualMachineFlexibleResources All 'resources[]' params are mutually exclusive, only one can be provided. +type VirtualMachineFlexibleResources struct { + CpuCores int `json:"cpu_cores"` + MemoryInGb int `json:"memory_in_gb"` + UseDedicatedCpus *bool `json:"use_dedicated_cpus,omitempty"` +} + +// VirtualMachineGPU defines model for VirtualMachineGPU. +type VirtualMachineGPU struct { + // Available When pending action is "attach", this indicates if there is a GPU of the relevant type available. + Available *bool `json:"available,omitempty"` + + // Id Unique ID for this GPU. Not available when status is "detached". + Id *string `json:"id"` + PendingAction *VirtualMachineGPUPendingActionEnum `json:"pending_action"` + Status *VirtualMachineGPUStatusEnum `json:"status,omitempty"` + Type *GPUType `json:"type,omitempty"` +} + +// VirtualMachineGPUPendingActionEnum defines model for VirtualMachineGPUPendingActionEnum. +type VirtualMachineGPUPendingActionEnum string + +// VirtualMachineGPUStatusEnum defines model for VirtualMachineGPUStatusEnum. +type VirtualMachineGPUStatusEnum string + +// VirtualMachineGroup defines model for VirtualMachineGroup. +type VirtualMachineGroup struct { + AutoSegregate *bool `json:"auto_segregate,omitempty"` + CreatedAt *int `json:"created_at,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Segregate *bool `json:"segregate,omitempty"` +} + +// VirtualMachineGroupArguments All 'properties[]' params are mutually exclusive, only one can be provided. +type VirtualMachineGroupArguments struct { + AutoSegregate *bool `json:"auto_segregate,omitempty"` + Name *string `json:"name,omitempty"` + Segregate *bool `json:"segregate,omitempty"` +} + +// VirtualMachineGroupLookup All 'group[]' params are mutually exclusive, only one can be provided. +type VirtualMachineGroupLookup struct { + Id *string `json:"id,omitempty"` +} + +// VirtualMachineGroupNotFoundEnum defines model for VirtualMachineGroupNotFoundEnum. +type VirtualMachineGroupNotFoundEnum string + +// VirtualMachineLookup All 'virtual_machine[]' params are mutually exclusive, only one can be provided. +type VirtualMachineLookup struct { + Fqdn *string `json:"fqdn,omitempty"` + Id *string `json:"id,omitempty"` +} + +// VirtualMachineMustBeStarted defines model for VirtualMachineMustBeStarted. +type VirtualMachineMustBeStarted struct { + CurrentState *string `json:"current_state,omitempty"` +} + +// VirtualMachineMustBeStartedEnum defines model for VirtualMachineMustBeStartedEnum. +type VirtualMachineMustBeStartedEnum string + +// VirtualMachineMustBeStartedSchema Virtual machines must be in a started state to create console sessions +type VirtualMachineMustBeStartedSchema struct { + Code *VirtualMachineMustBeStartedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *VirtualMachineMustBeStarted `json:"detail,omitempty"` +} + +// VirtualMachineNetworkInterfaceLookup All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. +type VirtualMachineNetworkInterfaceLookup struct { + Id *string `json:"id,omitempty"` +} + +// VirtualMachineNetworkInterfaceNotFoundEnum defines model for VirtualMachineNetworkInterfaceNotFoundEnum. +type VirtualMachineNetworkInterfaceNotFoundEnum string + +// VirtualMachineNetworkInterfaceNotFoundSchema No network interface was found matching any of the criteria provided in the arguments +type VirtualMachineNetworkInterfaceNotFoundSchema struct { + Code *VirtualMachineNetworkInterfaceNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// VirtualMachineNotFoundEnum defines model for VirtualMachineNotFoundEnum. +type VirtualMachineNotFoundEnum string + +// VirtualMachineNotFoundSchema No virtual machine was found matching any of the criteria provided in the arguments +type VirtualMachineNotFoundSchema struct { + Code *VirtualMachineNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// VirtualMachinePackage defines model for VirtualMachinePackage. +type VirtualMachinePackage struct { + CpuCores *int `json:"cpu_cores,omitempty"` + Icon *Attachment `json:"icon"` + Id *string `json:"id,omitempty"` + Ipv4Addresses *int `json:"ipv4_addresses,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MonthlyBandwidthAllowanceInGb *int `json:"monthly_bandwidth_allowance_in_gb"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` + Privacy *PrivacyTypesEnum `json:"privacy,omitempty"` + StorageInGb *int `json:"storage_in_gb,omitempty"` + UseDedicatedCpus *bool `json:"use_dedicated_cpus,omitempty"` +} + +// VirtualMachinePackageLookup All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. +type VirtualMachinePackageLookup struct { + Id *string `json:"id,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// VirtualMachinePackageNotFoundEnum defines model for VirtualMachinePackageNotFoundEnum. +type VirtualMachinePackageNotFoundEnum string + +// VirtualMachinePackageNotFoundSchema No package was found matching any of the criteria provided in the arguments +type VirtualMachinePackageNotFoundSchema struct { + Code *VirtualMachinePackageNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// VirtualMachineStateEnum defines model for VirtualMachineStateEnum. +type VirtualMachineStateEnum string + +// Zone defines model for Zone. +type Zone struct { + DataCenter *DataCenter `json:"data_center,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink"` +} + +// ZoneLookup All 'zone[]' params are mutually exclusive, only one can be provided. +type ZoneLookup struct { + Id *string `json:"id,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// ZoneNotFoundEnum defines model for ZoneNotFoundEnum. +type ZoneNotFoundEnum string + +// ZoneNotFoundSchema No zone was found matching any of the criteria provided in the arguments +type ZoneNotFoundSchema struct { + Code *ZoneNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// APIAuthenticator400Response defines model for APIAuthenticator400Response. +type APIAuthenticator400Response struct { + Code *MissingAPITokenEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// APIAuthenticator403Response defines model for APIAuthenticator403Response. +type APIAuthenticator403Response = OneOfAPIAuthenticator403Response + +// APIAuthenticator429Response defines model for APIAuthenticator429Response. +type APIAuthenticator429Response struct { + Code *RateLimitReachedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *RateLimitReached `json:"detail,omitempty"` +} + +// AddressListEntryNotFoundResponse defines model for AddressListEntryNotFoundResponse. +type AddressListEntryNotFoundResponse struct { + Code *AddressListEntryNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// AddressListNotFoundResponse defines model for AddressListNotFoundResponse. +type AddressListNotFoundResponse struct { + Code *AddressListNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// CertificateNotFoundResponse defines model for CertificateNotFoundResponse. +type CertificateNotFoundResponse struct { + Code *CertificateNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// CountryNotFoundResponse defines model for CountryNotFoundResponse. +type CountryNotFoundResponse struct { + Code *CountryNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// CountryStateNotFoundResponse defines model for CountryStateNotFoundResponse. +type CountryStateNotFoundResponse struct { + Code *CountryStateNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// CurrencyNotFoundResponse defines model for CurrencyNotFoundResponse. +type CurrencyNotFoundResponse struct { + Code *CurrencyNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DNSRecordNotFoundResponse defines model for DNSRecordNotFoundResponse. +type DNSRecordNotFoundResponse struct { + Code *DNSRecordNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DNSZoneNotFoundResponse defines model for DNSZoneNotFoundResponse. +type DNSZoneNotFoundResponse struct { + Code *DNSZoneNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DNSZoneNotVerifiedResponse defines model for DNSZoneNotVerifiedResponse. +type DNSZoneNotVerifiedResponse struct { + Code *DNSZoneNotVerifiedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DataCenterNotFoundResponse defines model for DataCenterNotFoundResponse. +type DataCenterNotFoundResponse struct { + Code *DataCenterNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res defines model for DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res. +type DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res = OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res + +// DeletionRestrictedResponse defines model for DeletionRestrictedResponse. +type DeletionRestrictedResponse struct { + Code *DeletionRestrictedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *DeletionRestricted `json:"detail,omitempty"` +} + +// DiskBackupPolicyNotFoundResponse defines model for DiskBackupPolicyNotFoundResponse. +type DiskBackupPolicyNotFoundResponse struct { + Code *DiskBackupPolicyNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DiskNotFoundResponse defines model for DiskNotFoundResponse. +type DiskNotFoundResponse struct { + Code *DiskNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DiskTemplateNotFoundResponse defines model for DiskTemplateNotFoundResponse. +type DiskTemplateNotFoundResponse struct { + Code *DiskTemplateNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DiskTemplateVersionNotFoundResponse defines model for DiskTemplateVersionNotFoundResponse. +type DiskTemplateVersionNotFoundResponse struct { + Code *DiskTemplateVersionNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// FileStorageVolumeNotFoundResponse defines model for FileStorageVolumeNotFoundResponse. +type FileStorageVolumeNotFoundResponse struct { + Code *FileStorageVolumeNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res defines model for FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res. +type FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res = OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res + +// GPUTypeNotFoundResponse defines model for GPUTypeNotFoundResponse. +type GPUTypeNotFoundResponse struct { + Code *GPUTypeNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// IPAddressNotFoundResponse defines model for IPAddressNotFoundResponse. +type IPAddressNotFoundResponse struct { + Code *IPAddressNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res. +type IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res = OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res + +// IPAddressNotFoundVirtualMachineNotFound404Res defines model for IPAddressNotFoundVirtualMachineNotFound404Res. +type IPAddressNotFoundVirtualMachineNotFound404Res = OneOfIPAddressNotFoundVirtualMachineNotFound404Res + +// IPAlreadyAllocatedInvalidIP422Res defines model for IPAlreadyAllocatedInvalidIP422Res. +type IPAlreadyAllocatedInvalidIP422Res = OneOfIPAlreadyAllocatedInvalidIP422Res + +// IPAlreadyAllocatedNoInterfaceAvailable422Res defines model for IPAlreadyAllocatedNoInterfaceAvailable422Res. +type IPAlreadyAllocatedNoInterfaceAvailable422Res = OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res + +// IdentityNotLinkedToWebSession400Res defines model for IdentityNotLinkedToWebSession400Res. +type IdentityNotLinkedToWebSession400Res = OneOfIdentityNotLinkedToWebSession400Res + +// InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res defines model for InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res. +type InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res = OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res + +// InvalidSpecXML400Res defines model for InvalidSpecXML400Res. +type InvalidSpecXML400Res = OneOfInvalidSpecXML400Res + +// InvalidTimestamp400Res defines model for InvalidTimestamp400Res. +type InvalidTimestamp400Res = OneOfInvalidTimestamp400Res + +// LoadBalancerNotFoundResponse defines model for LoadBalancerNotFoundResponse. +type LoadBalancerNotFoundResponse struct { + Code *LoadBalancerNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// LoadBalancerRuleNotFoundResponse defines model for LoadBalancerRuleNotFoundResponse. +type LoadBalancerRuleNotFoundResponse struct { + Code *LoadBalancerRuleNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// LocationRequiredValidationError422Res defines model for LocationRequiredValidationError422Res. +type LocationRequiredValidationError422Res = OneOfLocationRequiredValidationError422Res + +// NetworkNotFoundOrganizationNotFound404Res defines model for NetworkNotFoundOrganizationNotFound404Res. +type NetworkNotFoundOrganizationNotFound404Res = OneOfNetworkNotFoundOrganizationNotFound404Res + +// NetworkNotFoundResponse defines model for NetworkNotFoundResponse. +type NetworkNotFoundResponse struct { + Code *NetworkNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res defines model for NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res. +type NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res = OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res + +// NoAllocationResponse defines model for NoAllocationResponse. +type NoAllocationResponse struct { + Code *NoAllocationEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// NoAvailableAddressesResponse defines model for NoAvailableAddressesResponse. +type NoAvailableAddressesResponse struct { + Code *NoAvailableAddressesEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// NoUserAssociatedWithIdentityResponse defines model for NoUserAssociatedWithIdentityResponse. +type NoUserAssociatedWithIdentityResponse struct { + Code *NoUserAssociatedWithIdentityEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// NoVirtualMachineForAPITokenResponse defines model for NoVirtualMachineForAPITokenResponse. +type NoVirtualMachineForAPITokenResponse struct { + Code *NoVirtualMachineForAPITokenEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// ObjectInTrashResponse defines model for ObjectInTrashResponse. +type ObjectInTrashResponse struct { + Code *ObjectInTrashEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *ObjectInTrash `json:"detail,omitempty"` +} + +// ObjectInTrashTaskQueueingError406Res defines model for ObjectInTrashTaskQueueingError406Res. +type ObjectInTrashTaskQueueingError406Res = OneOfObjectInTrashTaskQueueingError406Res + +// ObjectInTrashVirtualMachineMustBeStarted406Res defines model for ObjectInTrashVirtualMachineMustBeStarted406Res. +type ObjectInTrashVirtualMachineMustBeStarted406Res = OneOfObjectInTrashVirtualMachineMustBeStarted406Res + +// OperatingSystemNotFoundOrganizationNotFound404Res defines model for OperatingSystemNotFoundOrganizationNotFound404Res. +type OperatingSystemNotFoundOrganizationNotFound404Res = OneOfOperatingSystemNotFoundOrganizationNotFound404Res + +// OperatingSystemNotFoundResponse defines model for OperatingSystemNotFoundResponse. +type OperatingSystemNotFoundResponse struct { + Code *OperatingSystemNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// OrganizationLimitReachedValidationError422Res defines model for OrganizationLimitReachedValidationError422Res. +type OrganizationLimitReachedValidationError422Res = OneOfOrganizationLimitReachedValidationError422Res + +// OrganizationNotActivatedOrganizationSuspended403Res defines model for OrganizationNotActivatedOrganizationSuspended403Res. +type OrganizationNotActivatedOrganizationSuspended403Res = OneOfOrganizationNotActivatedOrganizationSuspended403Res + +// OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res defines model for OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res. +type OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res = OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + +// OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res defines model for OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res. +type OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res = OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + +// OrganizationNotFoundResponse defines model for OrganizationNotFoundResponse. +type OrganizationNotFoundResponse struct { + Code *OrganizationNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// PermissionDenied403Res defines model for PermissionDenied403Res. +type PermissionDenied403Res = OneOfPermissionDenied403Res + +// ResourceDoesNotSupportUnallocationResponse defines model for ResourceDoesNotSupportUnallocationResponse. +type ResourceDoesNotSupportUnallocationResponse struct { + Code *ResourceDoesNotSupportUnallocationEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// SSHKeyNotFoundResponse defines model for SSHKeyNotFoundResponse. +type SSHKeyNotFoundResponse struct { + Code *SSHKeyNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// SecurityGroupNotFoundResponse defines model for SecurityGroupNotFoundResponse. +type SecurityGroupNotFoundResponse struct { + Code *SecurityGroupNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// SecurityGroupRuleNotFoundResponse defines model for SecurityGroupRuleNotFoundResponse. +type SecurityGroupRuleNotFoundResponse struct { + Code *SecurityGroupRuleNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// SpeedProfileAlreadyAssignedResponse defines model for SpeedProfileAlreadyAssignedResponse. +type SpeedProfileAlreadyAssignedResponse struct { + Code *SpeedProfileAlreadyAssignedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// TagNotFoundResponse defines model for TagNotFoundResponse. +type TagNotFoundResponse struct { + Code *TagNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// TaskNotFoundResponse defines model for TaskNotFoundResponse. +type TaskNotFoundResponse struct { + Code *TaskNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// TaskQueueingErrorResponse defines model for TaskQueueingErrorResponse. +type TaskQueueingErrorResponse struct { + Code *TaskQueueingErrorEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *TaskQueueingError `json:"detail,omitempty"` +} + +// TrashObjectNotFoundResponse defines model for TrashObjectNotFoundResponse. +type TrashObjectNotFoundResponse struct { + Code *TrashObjectNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// ValidationErrorResponse defines model for ValidationErrorResponse. +type ValidationErrorResponse struct { + Code *ValidationErrorEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *ValidationError `json:"detail,omitempty"` +} + +// VirtualMachineBuildNotFoundResponse defines model for VirtualMachineBuildNotFoundResponse. +type VirtualMachineBuildNotFoundResponse struct { + Code *VirtualMachineBuildNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// VirtualMachineGroupNotFoundResponse defines model for VirtualMachineGroupNotFoundResponse. +type VirtualMachineGroupNotFoundResponse struct { + Code *VirtualMachineGroupNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// VirtualMachineNetworkInterfaceNotFoundResponse defines model for VirtualMachineNetworkInterfaceNotFoundResponse. +type VirtualMachineNetworkInterfaceNotFoundResponse struct { + Code *VirtualMachineNetworkInterfaceNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// VirtualMachineNotFoundResponse defines model for VirtualMachineNotFoundResponse. +type VirtualMachineNotFoundResponse struct { + Code *VirtualMachineNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// VirtualMachineNotFoundVirtualMachinePackageNotFound404Res defines model for VirtualMachineNotFoundVirtualMachinePackageNotFound404Res. +type VirtualMachineNotFoundVirtualMachinePackageNotFound404Res = OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res + +// VirtualMachinePackageNotFoundResponse defines model for VirtualMachinePackageNotFoundResponse. +type VirtualMachinePackageNotFoundResponse struct { + Code *VirtualMachinePackageNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// ZoneNotFoundResponse defines model for ZoneNotFoundResponse. +type ZoneNotFoundResponse struct { + Code *ZoneNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// DeleteAddressListEntryJSONBody defines parameters for DeleteAddressListEntry. +type DeleteAddressListEntryJSONBody struct { + // AddressListEntry All 'address_list_entry[]' params are mutually exclusive, only one can be provided. + AddressListEntry AddressListEntryLookup `json:"address_list_entry"` +} + +// GetAddressListEntryParams defines parameters for GetAddressListEntry. +type GetAddressListEntryParams struct { + // AddressListEntryId The address list entry to return. All 'address_list_entry[]' params are mutually exclusive, only one can be provided. + AddressListEntryId *string `form:"address_list_entry[id],omitempty" json:"address_list_entry[id],omitempty"` +} + +// PatchAddressListEntryJSONBody defines parameters for PatchAddressListEntry. +type PatchAddressListEntryJSONBody struct { + // AddressListEntry All 'address_list_entry[]' params are mutually exclusive, only one can be provided. + AddressListEntry AddressListEntryLookup `json:"address_list_entry"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties AddressListEntryArguments `json:"properties"` +} + +// GetAddressListsParams defines parameters for GetAddressLists. +type GetAddressListsParams struct { + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// DeleteAddressListJSONBody defines parameters for DeleteAddressList. +type DeleteAddressListJSONBody struct { + // AddressList All 'address_list[]' params are mutually exclusive, only one can be provided. + AddressList AddressListLookup `json:"address_list"` +} + +// GetAddressListParams defines parameters for GetAddressList. +type GetAddressListParams struct { + // AddressListId The address list to return. All 'address_list[]' params are mutually exclusive, only one can be provided. + AddressListId *string `form:"address_list[id],omitempty" json:"address_list[id],omitempty"` +} + +// PatchAddressListJSONBody defines parameters for PatchAddressList. +type PatchAddressListJSONBody struct { + // AddressList All 'address_list[]' params are mutually exclusive, only one can be provided. + AddressList AddressListLookup `json:"address_list"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties AddressListArguments `json:"properties"` +} + +// GetAddressListEntriesParams defines parameters for GetAddressListEntries. +type GetAddressListEntriesParams struct { + // AddressListId The address list for which the entries should be returned. All 'address_list[]' params are mutually exclusive, only one can be provided. + AddressListId *string `form:"address_list[id],omitempty" json:"address_list[id],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostAddressListEntriesJSONBody defines parameters for PostAddressListEntries. +type PostAddressListEntriesJSONBody struct { + // AddressList All 'address_list[]' params are mutually exclusive, only one can be provided. + AddressList AddressListLookup `json:"address_list"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties AddressListEntryArguments `json:"properties"` +} + +// GetCertificateParams defines parameters for GetCertificate. +type GetCertificateParams struct { + // CertificateId All 'certificate[]' params are mutually exclusive, only one can be provided. + CertificateId *string `form:"certificate[id],omitempty" json:"certificate[id],omitempty"` +} + +// GetCountriesParams defines parameters for GetCountries. +type GetCountriesParams struct { + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetCountryParams defines parameters for GetCountry. +type GetCountryParams struct { + // CountryId The country to return. All 'country[]' params are mutually exclusive, only one can be provided. + CountryId *string `form:"country[id],omitempty" json:"country[id],omitempty"` + + // CountryIsoCode2 The country to return. All 'country[]' params are mutually exclusive, only one can be provided. + CountryIsoCode2 *string `form:"country[iso_code2],omitempty" json:"country[iso_code2],omitempty"` + + // CountryIsoCode3 The country to return. All 'country[]' params are mutually exclusive, only one can be provided. + CountryIsoCode3 *string `form:"country[iso_code3],omitempty" json:"country[iso_code3],omitempty"` +} + +// GetCountryCountryStatesParams defines parameters for GetCountryCountryStates. +type GetCountryCountryStatesParams struct { + // CountryId The country to return states for. All 'country[]' params are mutually exclusive, only one can be provided. + CountryId *string `form:"country[id],omitempty" json:"country[id],omitempty"` + + // CountryIsoCode2 The country to return states for. All 'country[]' params are mutually exclusive, only one can be provided. + CountryIsoCode2 *string `form:"country[iso_code2],omitempty" json:"country[iso_code2],omitempty"` + + // CountryIsoCode3 The country to return states for. All 'country[]' params are mutually exclusive, only one can be provided. + CountryIsoCode3 *string `form:"country[iso_code3],omitempty" json:"country[iso_code3],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetCountryStateParams defines parameters for GetCountryState. +type GetCountryStateParams struct { + // CountryStateId The country state to return. All 'country_state[]' params are mutually exclusive, only one can be provided. + CountryStateId *string `form:"country_state[id],omitempty" json:"country_state[id],omitempty"` +} + +// GetCurrenciesParams defines parameters for GetCurrencies. +type GetCurrenciesParams struct { + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetCurrencyParams defines parameters for GetCurrency. +type GetCurrencyParams struct { + // CurrencyId The currency to return. All 'currency[]' params are mutually exclusive, only one can be provided. + CurrencyId *string `form:"currency[id],omitempty" json:"currency[id],omitempty"` + + // CurrencyIsoCode The currency to return. All 'currency[]' params are mutually exclusive, only one can be provided. + CurrencyIsoCode *string `form:"currency[iso_code],omitempty" json:"currency[iso_code],omitempty"` +} + +// GetDataCenterParams defines parameters for GetDataCenter. +type GetDataCenterParams struct { + // DataCenterId All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenterId *string `form:"data_center[id],omitempty" json:"data_center[id],omitempty"` + + // DataCenterPermalink All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenterPermalink *string `form:"data_center[permalink],omitempty" json:"data_center[permalink],omitempty"` +} + +// GetDataCenterDefaultNetworkParams defines parameters for GetDataCenterDefaultNetwork. +type GetDataCenterDefaultNetworkParams struct { + // DataCenterId All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenterId *string `form:"data_center[id],omitempty" json:"data_center[id],omitempty"` + + // DataCenterPermalink All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenterPermalink *string `form:"data_center[permalink],omitempty" json:"data_center[permalink],omitempty"` +} + +// GetDataCenterGpuTypesParams defines parameters for GetDataCenterGpuTypes. +type GetDataCenterGpuTypesParams struct { + // DataCenterId The data center to list GPU types for. All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenterId *string `form:"data_center[id],omitempty" json:"data_center[id],omitempty"` + + // DataCenterPermalink The data center to list GPU types for. All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenterPermalink *string `form:"data_center[permalink],omitempty" json:"data_center[permalink],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// DeleteDiskBackupPolicyJSONBody defines parameters for DeleteDiskBackupPolicy. +type DeleteDiskBackupPolicyJSONBody struct { + // DiskBackupPolicy All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. + DiskBackupPolicy DiskBackupPolicyLookup `json:"disk_backup_policy"` +} + +// GetDiskBackupPolicyParams defines parameters for GetDiskBackupPolicy. +type GetDiskBackupPolicyParams struct { + // DiskBackupPolicyId The disk backup policy to get information for. All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. + DiskBackupPolicyId *string `form:"disk_backup_policy[id],omitempty" json:"disk_backup_policy[id],omitempty"` +} + +// PatchDiskBackupPolicyJSONBody defines parameters for PatchDiskBackupPolicy. +type PatchDiskBackupPolicyJSONBody struct { + // DiskBackupPolicy All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. + DiskBackupPolicy DiskBackupPolicyLookup `json:"disk_backup_policy"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties DiskBackupPolicyArguments `json:"properties"` +} + +// DeleteDiskBackupPolicyScheduleJSONBody defines parameters for DeleteDiskBackupPolicySchedule. +type DeleteDiskBackupPolicyScheduleJSONBody struct { + // DiskBackupPolicy All 'disk_backup_policy[]' params are mutually exclusive, only one can be provided. + DiskBackupPolicy DiskBackupPolicyLookup `json:"disk_backup_policy"` + + // Timestamp The time the disk backup policy will be moved to the trash automatically. + Timestamp int `json:"timestamp"` +} + +// GetDiskTemplateVersionParams defines parameters for GetDiskTemplateVersion. +type GetDiskTemplateVersionParams struct { + // DiskTemplateVersionId The disk template version to return. All 'disk_template_version[]' params are mutually exclusive, only one can be provided. + DiskTemplateVersionId *string `form:"disk_template_version[id],omitempty" json:"disk_template_version[id],omitempty"` +} + +// GetDiskTemplateVersionSpecParams defines parameters for GetDiskTemplateVersionSpec. +type GetDiskTemplateVersionSpecParams struct { + // DiskTemplateVersionId The disk template version to return. All 'disk_template_version[]' params are mutually exclusive, only one can be provided. + DiskTemplateVersionId *string `form:"disk_template_version[id],omitempty" json:"disk_template_version[id],omitempty"` +} + +// GetDiskTemplateParams defines parameters for GetDiskTemplate. +type GetDiskTemplateParams struct { + // DiskTemplateId The disk template to return. All 'disk_template[]' params are mutually exclusive, only one can be provided. + DiskTemplateId *string `form:"disk_template[id],omitempty" json:"disk_template[id],omitempty"` + + // DiskTemplatePermalink The disk template to return. All 'disk_template[]' params are mutually exclusive, only one can be provided. + DiskTemplatePermalink *string `form:"disk_template[permalink],omitempty" json:"disk_template[permalink],omitempty"` +} + +// GetDiskTemplateVersionsParams defines parameters for GetDiskTemplateVersions. +type GetDiskTemplateVersionsParams struct { + // DiskTemplateId The disk template to return the versions for. All 'disk_template[]' params are mutually exclusive, only one can be provided. + DiskTemplateId *string `form:"disk_template[id],omitempty" json:"disk_template[id],omitempty"` + + // DiskTemplatePermalink The disk template to return the versions for. All 'disk_template[]' params are mutually exclusive, only one can be provided. + DiskTemplatePermalink *string `form:"disk_template[permalink],omitempty" json:"disk_template[permalink],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetDiskParams defines parameters for GetDisk. +type GetDiskParams struct { + // DiskId The disk to return. All 'disk[]' params are mutually exclusive, only one can be provided. + DiskId *string `form:"disk[id],omitempty" json:"disk[id],omitempty"` +} + +// GetDiskDiskBackupPoliciesParams defines parameters for GetDiskDiskBackupPolicies. +type GetDiskDiskBackupPoliciesParams struct { + // DiskId The disk to return disk backup policies for. All 'disk[]' params are mutually exclusive, only one can be provided. + DiskId *string `form:"disk[id],omitempty" json:"disk[id],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostDiskDiskBackupPoliciesJSONBody defines parameters for PostDiskDiskBackupPolicies. +type PostDiskDiskBackupPoliciesJSONBody struct { + // Disk All 'disk[]' params are mutually exclusive, only one can be provided. + Disk DiskLookup `json:"disk"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties DiskBackupPolicyArguments `json:"properties"` +} + +// DeleteDnsRecordJSONBody defines parameters for DeleteDnsRecord. +type DeleteDnsRecordJSONBody struct { + // DnsRecord All 'dns_record[]' params are mutually exclusive, only one can be provided. + DnsRecord DNSRecordLookup `json:"dns_record"` +} + +// GetDnsRecordParams defines parameters for GetDnsRecord. +type GetDnsRecordParams struct { + // DnsRecordId All 'dns_record[]' params are mutually exclusive, only one can be provided. + DnsRecordId *string `form:"dns_record[id],omitempty" json:"dns_record[id],omitempty"` +} + +// PatchDnsRecordJSONBody defines parameters for PatchDnsRecord. +type PatchDnsRecordJSONBody struct { + // DnsRecord All 'dns_record[]' params are mutually exclusive, only one can be provided. + DnsRecord DNSRecordLookup `json:"dns_record"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties DNSRecordArguments `json:"properties"` +} + +// DeleteDnsZoneJSONBody defines parameters for DeleteDnsZone. +type DeleteDnsZoneJSONBody struct { + // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZone DNSZoneLookup `json:"dns_zone"` +} + +// GetDnsZoneParams defines parameters for GetDnsZone. +type GetDnsZoneParams struct { + // DnsZoneId All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZoneId *string `form:"dns_zone[id],omitempty" json:"dns_zone[id],omitempty"` + + // DnsZoneName All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZoneName *string `form:"dns_zone[name],omitempty" json:"dns_zone[name],omitempty"` +} + +// PatchDnsZoneJSONBody defines parameters for PatchDnsZone. +type PatchDnsZoneJSONBody struct { + // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZone DNSZoneLookup `json:"dns_zone"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties DNSZoneArguments `json:"properties"` +} + +// GetDnsZoneRecordsParams defines parameters for GetDnsZoneRecords. +type GetDnsZoneRecordsParams struct { + // DnsZoneId All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZoneId *string `form:"dns_zone[id],omitempty" json:"dns_zone[id],omitempty"` + + // DnsZoneName All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZoneName *string `form:"dns_zone[name],omitempty" json:"dns_zone[name],omitempty"` +} + +// PostDnsZoneRecordsJSONBody defines parameters for PostDnsZoneRecords. +type PostDnsZoneRecordsJSONBody struct { + // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZone DNSZoneLookup `json:"dns_zone"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties DNSRecordArguments `json:"properties"` +} + +// PostDnsZoneVerifyJSONBody defines parameters for PostDnsZoneVerify. +type PostDnsZoneVerifyJSONBody struct { + // DnsZone All 'dns_zone[]' params are mutually exclusive, only one can be provided. + DnsZone DNSZoneLookup `json:"dns_zone"` +} + +// DeleteFileStorageVolumeJSONBody defines parameters for DeleteFileStorageVolume. +type DeleteFileStorageVolumeJSONBody struct { + // FileStorageVolume All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. + FileStorageVolume FileStorageVolumeLookup `json:"file_storage_volume"` +} + +// GetFileStorageVolumeParams defines parameters for GetFileStorageVolume. +type GetFileStorageVolumeParams struct { + // FileStorageVolumeId The file storage volume to return. All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. + FileStorageVolumeId *string `form:"file_storage_volume[id],omitempty" json:"file_storage_volume[id],omitempty"` +} + +// PatchFileStorageVolumeJSONBody defines parameters for PatchFileStorageVolume. +type PatchFileStorageVolumeJSONBody struct { + // FileStorageVolume All 'file_storage_volume[]' params are mutually exclusive, only one can be provided. + FileStorageVolume FileStorageVolumeLookup `json:"file_storage_volume"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties FileStorageVolumeArguments `json:"properties"` +} + +// GetGpuTypesParams defines parameters for GetGpuTypes. +type GetGpuTypesParams struct { + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetGpuTypeParams defines parameters for GetGpuType. +type GetGpuTypeParams struct { + // GpuTypeId All 'gpu_type[]' params are mutually exclusive, only one can be provided. + GpuTypeId *string `form:"gpu_type[id],omitempty" json:"gpu_type[id],omitempty"` + + // GpuTypePermalink All 'gpu_type[]' params are mutually exclusive, only one can be provided. + GpuTypePermalink *string `form:"gpu_type[permalink],omitempty" json:"gpu_type[permalink],omitempty"` +} + +// PostInvalidateLinkedWebSessionJSONBody defines parameters for PostInvalidateLinkedWebSession. +type PostInvalidateLinkedWebSessionJSONBody = interface{} + +// DeleteIpAddressJSONBody defines parameters for DeleteIpAddress. +type DeleteIpAddressJSONBody struct { + // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. + IpAddress IPAddressLookup `json:"ip_address"` +} + +// GetIpAddressParams defines parameters for GetIpAddress. +type GetIpAddressParams struct { + // IpAddressId The IP address to find. All 'ip_address[]' params are mutually exclusive, only one can be provided. + IpAddressId *string `form:"ip_address[id],omitempty" json:"ip_address[id],omitempty"` + + // IpAddressAddress The IP address to find. All 'ip_address[]' params are mutually exclusive, only one can be provided. + IpAddressAddress *string `form:"ip_address[address],omitempty" json:"ip_address[address],omitempty"` +} + +// PatchIpAddressJSONBody defines parameters for PatchIpAddress. +type PatchIpAddressJSONBody struct { + // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. + IpAddress IPAddressLookup `json:"ip_address"` + + // Label The label to give this address if setting it as a VIP + Label *string `json:"label,omitempty"` + + // ReverseDns The reverse DNS to set for this IP address + ReverseDns *string `json:"reverse_dns,omitempty"` + + // Vip Whether or not to set this address as a VIP + Vip *bool `json:"vip,omitempty"` +} + +// PostIpAddressUnallocateJSONBody defines parameters for PostIpAddressUnallocate. +type PostIpAddressUnallocateJSONBody struct { + // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. + IpAddress IPAddressLookup `json:"ip_address"` +} + +// DeleteLoadBalancerJSONBody defines parameters for DeleteLoadBalancer. +type DeleteLoadBalancerJSONBody struct { + // LoadBalancer All 'load_balancer[]' params are mutually exclusive, only one can be provided. + LoadBalancer LoadBalancerLookup `json:"load_balancer"` +} + +// GetLoadBalancerParams defines parameters for GetLoadBalancer. +type GetLoadBalancerParams struct { + // LoadBalancerId The load balancer to return the details for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. + LoadBalancerId *string `form:"load_balancer[id],omitempty" json:"load_balancer[id],omitempty"` + + // LoadBalancerApiReference The load balancer to return the details for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. + LoadBalancerApiReference *string `form:"load_balancer[api_reference],omitempty" json:"load_balancer[api_reference],omitempty"` +} + +// PatchLoadBalancerJSONBody defines parameters for PatchLoadBalancer. +type PatchLoadBalancerJSONBody struct { + // LoadBalancer All 'load_balancer[]' params are mutually exclusive, only one can be provided. + LoadBalancer LoadBalancerLookup `json:"load_balancer"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties LoadBalancerArguments `json:"properties"` +} + +// GetLoadBalancerRulesParams defines parameters for GetLoadBalancerRules. +type GetLoadBalancerRulesParams struct { + // LoadBalancerId The load balancer to return all load rules for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. + LoadBalancerId *string `form:"load_balancer[id],omitempty" json:"load_balancer[id],omitempty"` + + // LoadBalancerApiReference The load balancer to return all load rules for. All 'load_balancer[]' params are mutually exclusive, only one can be provided. + LoadBalancerApiReference *string `form:"load_balancer[api_reference],omitempty" json:"load_balancer[api_reference],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostLoadBalancerRulesJSONBody defines parameters for PostLoadBalancerRules. +type PostLoadBalancerRulesJSONBody struct { + // LoadBalancer All 'load_balancer[]' params are mutually exclusive, only one can be provided. + LoadBalancer LoadBalancerLookup `json:"load_balancer"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties LoadBalancerRuleArguments `json:"properties"` +} + +// DeleteLoadBalancersRulesLoadBalancerRuleJSONBody defines parameters for DeleteLoadBalancersRulesLoadBalancerRule. +type DeleteLoadBalancersRulesLoadBalancerRuleJSONBody struct { + // LoadBalancerRule All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. + LoadBalancerRule LoadBalancerRuleLookup `json:"load_balancer_rule"` +} + +// GetLoadBalancersRulesLoadBalancerRuleParams defines parameters for GetLoadBalancersRulesLoadBalancerRule. +type GetLoadBalancersRulesLoadBalancerRuleParams struct { + // LoadBalancerRuleId The load balancer rule to return the details for. All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. + LoadBalancerRuleId *string `form:"load_balancer_rule[id],omitempty" json:"load_balancer_rule[id],omitempty"` +} + +// PatchLoadBalancersRulesLoadBalancerRuleJSONBody defines parameters for PatchLoadBalancersRulesLoadBalancerRule. +type PatchLoadBalancersRulesLoadBalancerRuleJSONBody struct { + // LoadBalancerRule All 'load_balancer_rule[]' params are mutually exclusive, only one can be provided. + LoadBalancerRule LoadBalancerRuleLookup `json:"load_balancer_rule"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties LoadBalancerRuleArguments `json:"properties"` +} + +// GetNetworkParams defines parameters for GetNetwork. +type GetNetworkParams struct { + // NetworkId The network to return. All 'network[]' params are mutually exclusive, only one can be provided. + NetworkId *string `form:"network[id],omitempty" json:"network[id],omitempty"` + + // NetworkPermalink The network to return. All 'network[]' params are mutually exclusive, only one can be provided. + NetworkPermalink *string `form:"network[permalink],omitempty" json:"network[permalink],omitempty"` +} + +// GetOperatingSystemsParams defines parameters for GetOperatingSystems. +type GetOperatingSystemsParams struct { + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetOperatingSystemParams defines parameters for GetOperatingSystem. +type GetOperatingSystemParams struct { + // OperatingSystemId The operating system to return. All 'operating_system[]' params are mutually exclusive, only one can be provided. + OperatingSystemId *string `form:"operating_system[id],omitempty" json:"operating_system[id],omitempty"` +} + +// GetOrganizationParams defines parameters for GetOrganization. +type GetOrganizationParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` +} + +// GetOrganizationAddressListsParams defines parameters for GetOrganizationAddressLists. +type GetOrganizationAddressListsParams struct { + // OrganizationId The organization for which the address lists should be returned. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization for which the address lists should be returned. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationAddressListsJSONBody defines parameters for PostOrganizationAddressLists. +type PostOrganizationAddressListsJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties AddressListArguments `json:"properties"` +} + +// GetOrganizationAvailableNetworksParams defines parameters for GetOrganizationAvailableNetworks. +type GetOrganizationAvailableNetworksParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` +} + +// GetOrganizationCertificatesParams defines parameters for GetOrganizationCertificates. +type GetOrganizationCertificatesParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetOrganizationDiskBackupPoliciesParams defines parameters for GetOrganizationDiskBackupPolicies. +type GetOrganizationDiskBackupPoliciesParams struct { + // OrganizationId The organization to return disk backup policies for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to return disk backup policies for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetOrganizationDiskTemplatesParams defines parameters for GetOrganizationDiskTemplates. +type GetOrganizationDiskTemplatesParams struct { + // OrganizationId The organization to find disk templates for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to find disk templates for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + + // IncludeUniversal Whether or not to include universal templates + IncludeUniversal *bool `form:"include_universal,omitempty" json:"include_universal,omitempty"` + + // OperatingSystemId An operating system to use to filter disk templates. All 'operating_system[]' params are mutually exclusive, only one can be provided. + OperatingSystemId *string `form:"operating_system[id],omitempty" json:"operating_system[id],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetOrganizationDisksParams defines parameters for GetOrganizationDisks. +type GetOrganizationDisksParams struct { + // OrganizationId The organization to find disks for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to find disks for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetOrganizationDnsZonesParams defines parameters for GetOrganizationDnsZones. +type GetOrganizationDnsZonesParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationDnsZonesJSONBody defines parameters for PostOrganizationDnsZones. +type PostOrganizationDnsZonesJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties DNSZoneArguments `json:"properties"` +} + +// GetOrganizationDnsZonesNameserversParams defines parameters for GetOrganizationDnsZonesNameservers. +type GetOrganizationDnsZonesNameserversParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` +} + +// GetOrganizationFileStorageVolumesParams defines parameters for GetOrganizationFileStorageVolumes. +type GetOrganizationFileStorageVolumesParams struct { + // OrganizationId The organization to return all file storage volumes for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to return all file storage volumes for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationFileStorageVolumesJSONBody defines parameters for PostOrganizationFileStorageVolumes. +type PostOrganizationFileStorageVolumesJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties FileStorageVolumeArguments `json:"properties"` +} + +// GetOrganizationIpAddressesParams defines parameters for GetOrganizationIpAddresses. +type GetOrganizationIpAddressesParams struct { + // OrganizationId The organization to use when looking up IP addresses. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to use when looking up IP addresses. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + + // Allocated If true, only return allocated IP addresss. If false, only return unallocated IP addresses. + Allocated *bool `form:"allocated,omitempty" json:"allocated,omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationIpAddressesJSONBody defines parameters for PostOrganizationIpAddresses. +type PostOrganizationIpAddressesJSONBody struct { + // Label The label to give this address if setting it as a VIP + Label *string `json:"label,omitempty"` + + // Network All 'network[]' params are mutually exclusive, only one can be provided. + Network NetworkLookup `json:"network"` + + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + Version IPAddressVersionEnum `json:"version"` + + // Vip Whether or not to set this address as a VIP + Vip *bool `json:"vip,omitempty"` +} + +// GetOrganizationLoadBalancersParams defines parameters for GetOrganizationLoadBalancers. +type GetOrganizationLoadBalancersParams struct { + // OrganizationId The organization to return all load balancers for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to return all load balancers for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationLoadBalancersJSONBody defines parameters for PostOrganizationLoadBalancers. +type PostOrganizationLoadBalancersJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties LoadBalancerArguments `json:"properties"` +} + +// GetOrganizationManagedParams defines parameters for GetOrganizationManaged. +type GetOrganizationManagedParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationManagedJSONBody defines parameters for PostOrganizationManaged. +type PostOrganizationManagedJSONBody struct { + Name string `json:"name"` + + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + SubDomain string `json:"sub_domain"` +} + +// GetOrganizationNetworkSpeedProfilesParams defines parameters for GetOrganizationNetworkSpeedProfiles. +type GetOrganizationNetworkSpeedProfilesParams struct { + // OrganizationId The organization to use when looking up network speed profiles. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to use when looking up network speed profiles. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetOrganizationPolicyLimitsParams defines parameters for GetOrganizationPolicyLimits. +type GetOrganizationPolicyLimitsParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` +} + +// GetOrganizationSecurityGroupsParams defines parameters for GetOrganizationSecurityGroups. +type GetOrganizationSecurityGroupsParams struct { + // OrganizationId The organization to return all security groups for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to return all security groups for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationSecurityGroupsJSONBody defines parameters for PostOrganizationSecurityGroups. +type PostOrganizationSecurityGroupsJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties SecurityGroupArguments `json:"properties"` +} + +// GetOrganizationSshKeysParams defines parameters for GetOrganizationSshKeys. +type GetOrganizationSshKeysParams struct { + // OrganizationId The organization to list SSH keys for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to list SSH keys for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationSshKeysJSONBody defines parameters for PostOrganizationSshKeys. +type PostOrganizationSshKeysJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // SshKey All 'ssh_key[]' params are mutually exclusive, only one can be provided. + SshKey AuthSSHKeyProperties `json:"ssh_key"` +} + +// GetOrganizationTagsParams defines parameters for GetOrganizationTags. +type GetOrganizationTagsParams struct { + // OrganizationId The organization to list the tags for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to list the tags for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationTagsJSONBody defines parameters for PostOrganizationTags. +type PostOrganizationTagsJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties TagArguments `json:"properties"` +} + +// GetOrganizationTrashObjectsParams defines parameters for GetOrganizationTrashObjects. +type GetOrganizationTrashObjectsParams struct { + // OrganizationId The organization to find all trash objects for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to find all trash objects for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationTrashObjectsPurgeAllJSONBody defines parameters for PostOrganizationTrashObjectsPurgeAll. +type PostOrganizationTrashObjectsPurgeAllJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` +} + +// GetOrganizationUsersWithAccessParams defines parameters for GetOrganizationUsersWithAccess. +type GetOrganizationUsersWithAccessParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetOrganizationVirtualMachineGroupsParams defines parameters for GetOrganizationVirtualMachineGroups. +type GetOrganizationVirtualMachineGroupsParams struct { + // OrganizationId The organization to return groups for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain The organization to return groups for. All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` +} + +// PostOrganizationVirtualMachineGroupsJSONBody defines parameters for PostOrganizationVirtualMachineGroups. +type PostOrganizationVirtualMachineGroupsJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties VirtualMachineGroupArguments `json:"properties"` +} + +// GetOrganizationVirtualMachinesParams defines parameters for GetOrganizationVirtualMachines. +type GetOrganizationVirtualMachinesParams struct { + // OrganizationId All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostOrganizationVirtualMachinesBuildJSONBody defines parameters for PostOrganizationVirtualMachinesBuild. +type PostOrganizationVirtualMachinesBuildJSONBody struct { + // DataCenter All 'data_center[]' params are mutually exclusive, only one can be provided. + DataCenter *DataCenterLookup `json:"data_center,omitempty"` + + // DiskTemplate All 'disk_template[]' params are mutually exclusive, only one can be provided. + DiskTemplate *DiskTemplateLookup `json:"disk_template,omitempty"` + DiskTemplateOptions *[]KeyValue `json:"disk_template_options,omitempty"` + Hostname *string `json:"hostname,omitempty"` + + // Network All 'network[]' params are mutually exclusive, only one can be provided. + Network *NetworkLookup `json:"network,omitempty"` + + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + + // Package All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. + Package VirtualMachinePackageLookup `json:"package"` + + // Zone All 'zone[]' params are mutually exclusive, only one can be provided. + Zone *ZoneLookup `json:"zone,omitempty"` +} + +// PostOrganizationVirtualMachinesBuildFromSpecJSONBody defines parameters for PostOrganizationVirtualMachinesBuildFromSpec. +type PostOrganizationVirtualMachinesBuildFromSpecJSONBody struct { + // Organization All 'organization[]' params are mutually exclusive, only one can be provided. + Organization OrganizationLookup `json:"organization"` + Xml string `json:"xml"` +} + +// DeleteSecurityGroupJSONBody defines parameters for DeleteSecurityGroup. +type DeleteSecurityGroupJSONBody struct { + // SecurityGroup All 'security_group[]' params are mutually exclusive, only one can be provided. + SecurityGroup SecurityGroupLookup `json:"security_group"` +} + +// GetSecurityGroupParams defines parameters for GetSecurityGroup. +type GetSecurityGroupParams struct { + // SecurityGroupId The security group to return the details for. All 'security_group[]' params are mutually exclusive, only one can be provided. + SecurityGroupId *string `form:"security_group[id],omitempty" json:"security_group[id],omitempty"` +} + +// PatchSecurityGroupJSONBody defines parameters for PatchSecurityGroup. +type PatchSecurityGroupJSONBody struct { + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties SecurityGroupArguments `json:"properties"` + + // SecurityGroup All 'security_group[]' params are mutually exclusive, only one can be provided. + SecurityGroup SecurityGroupLookup `json:"security_group"` +} + +// GetSecurityGroupRulesParams defines parameters for GetSecurityGroupRules. +type GetSecurityGroupRulesParams struct { + // SecurityGroupId The security group to return all load rules for. All 'security_group[]' params are mutually exclusive, only one can be provided. + SecurityGroupId *string `form:"security_group[id],omitempty" json:"security_group[id],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostSecurityGroupRulesJSONBody defines parameters for PostSecurityGroupRules. +type PostSecurityGroupRulesJSONBody struct { + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties SecurityGroupRuleArguments `json:"properties"` + + // SecurityGroup All 'security_group[]' params are mutually exclusive, only one can be provided. + SecurityGroup SecurityGroupLookup `json:"security_group"` +} + +// DeleteSecurityGroupsRulesSecurityGroupRuleJSONBody defines parameters for DeleteSecurityGroupsRulesSecurityGroupRule. +type DeleteSecurityGroupsRulesSecurityGroupRuleJSONBody struct { + // SecurityGroupRule All 'security_group_rule[]' params are mutually exclusive, only one can be provided. + SecurityGroupRule SecurityGroupRuleLookup `json:"security_group_rule"` +} + +// GetSecurityGroupsRulesSecurityGroupRuleParams defines parameters for GetSecurityGroupsRulesSecurityGroupRule. +type GetSecurityGroupsRulesSecurityGroupRuleParams struct { + // SecurityGroupRuleId The security group rule to return the details for. All 'security_group_rule[]' params are mutually exclusive, only one can be provided. + SecurityGroupRuleId *string `form:"security_group_rule[id],omitempty" json:"security_group_rule[id],omitempty"` +} + +// PatchSecurityGroupsRulesSecurityGroupRuleJSONBody defines parameters for PatchSecurityGroupsRulesSecurityGroupRule. +type PatchSecurityGroupsRulesSecurityGroupRuleJSONBody struct { + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties SecurityGroupRuleArguments `json:"properties"` + + // SecurityGroupRule All 'security_group_rule[]' params are mutually exclusive, only one can be provided. + SecurityGroupRule SecurityGroupRuleLookup `json:"security_group_rule"` +} + +// DeleteSshKeyJSONBody defines parameters for DeleteSshKey. +type DeleteSshKeyJSONBody struct { + // SshKey All 'ssh_key[]' params are mutually exclusive, only one can be provided. + SshKey AuthSSHKeyLookup `json:"ssh_key"` +} + +// DeleteTagJSONBody defines parameters for DeleteTag. +type DeleteTagJSONBody struct { + // Tag All 'tag[]' params are mutually exclusive, only one can be provided. + Tag TagLookup `json:"tag"` +} + +// GetTagParams defines parameters for GetTag. +type GetTagParams struct { + // TagId The tag to load the details for. All 'tag[]' params are mutually exclusive, only one can be provided. + TagId *string `form:"tag[id],omitempty" json:"tag[id],omitempty"` +} + +// PatchTagJSONBody defines parameters for PatchTag. +type PatchTagJSONBody struct { + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties TagArguments `json:"properties"` + + // Tag All 'tag[]' params are mutually exclusive, only one can be provided. + Tag TagLookup `json:"tag"` +} + +// GetTaskParams defines parameters for GetTask. +type GetTaskParams struct { + // TaskId All 'task[]' params are mutually exclusive, only one can be provided. + TaskId *string `form:"task[id],omitempty" json:"task[id],omitempty"` +} + +// DeleteTrashObjectJSONBody defines parameters for DeleteTrashObject. +type DeleteTrashObjectJSONBody struct { + // TrashObject All 'trash_object[]' params are mutually exclusive, only one can be provided. + TrashObject TrashObjectLookup `json:"trash_object"` +} + +// GetTrashObjectParams defines parameters for GetTrashObject. +type GetTrashObjectParams struct { + // TrashObjectId The trash object to find. All 'trash_object[]' params are mutually exclusive, only one can be provided. + TrashObjectId *string `form:"trash_object[id],omitempty" json:"trash_object[id],omitempty"` + + // TrashObjectObjectId The trash object to find. All 'trash_object[]' params are mutually exclusive, only one can be provided. + TrashObjectObjectId *string `form:"trash_object[object_id],omitempty" json:"trash_object[object_id],omitempty"` +} + +// PostTrashObjectRestoreJSONBody defines parameters for PostTrashObjectRestore. +type PostTrashObjectRestoreJSONBody struct { + // TrashObject All 'trash_object[]' params are mutually exclusive, only one can be provided. + TrashObject TrashObjectLookup `json:"trash_object"` +} + +// DeleteVirtualMachineGroupJSONBody defines parameters for DeleteVirtualMachineGroup. +type DeleteVirtualMachineGroupJSONBody struct { + // VirtualMachineGroup All 'group[]' params are mutually exclusive, only one can be provided. + VirtualMachineGroup VirtualMachineGroupLookup `json:"virtual_machine_group"` +} + +// GetVirtualMachineGroupParams defines parameters for GetVirtualMachineGroup. +type GetVirtualMachineGroupParams struct { + // VirtualMachineGroupId The virtual machine group to retrieve. All 'virtual_machine_group[]' params are mutually exclusive, only one can be provided. + VirtualMachineGroupId *string `form:"virtual_machine_group[id],omitempty" json:"virtual_machine_group[id],omitempty"` +} + +// PatchVirtualMachineGroupJSONBody defines parameters for PatchVirtualMachineGroup. +type PatchVirtualMachineGroupJSONBody struct { + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties VirtualMachineGroupArguments `json:"properties"` + + // VirtualMachineGroup All 'group[]' params are mutually exclusive, only one can be provided. + VirtualMachineGroup VirtualMachineGroupLookup `json:"virtual_machine_group"` +} + +// GetVMNIVMNIParams defines parameters for GetVMNIVMNI. +type GetVMNIVMNIParams struct { + // VirtualMachineNetworkInterfaceId The network interface to show the information for. All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. + VirtualMachineNetworkInterfaceId *string `form:"virtual_machine_network_interface[id],omitempty" json:"virtual_machine_network_interface[id],omitempty"` +} + +// PostVirtualMachineNetworkInterfaceAllocateIpJSONBody defines parameters for PostVirtualMachineNetworkInterfaceAllocateIp. +type PostVirtualMachineNetworkInterfaceAllocateIpJSONBody struct { + // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. + IpAddress IPAddressLookup `json:"ip_address"` + + // VirtualMachineNetworkInterface All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. + VirtualMachineNetworkInterface VirtualMachineNetworkInterfaceLookup `json:"virtual_machine_network_interface"` +} + +// PostVirtualMachineNetworkInterfaceAllocateNewIpJSONBody defines parameters for PostVirtualMachineNetworkInterfaceAllocateNewIp. +type PostVirtualMachineNetworkInterfaceAllocateNewIpJSONBody struct { + AddressVersion IPAddressVersionEnum `json:"address_version"` + + // VirtualMachineNetworkInterface All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. + VirtualMachineNetworkInterface VirtualMachineNetworkInterfaceLookup `json:"virtual_machine_network_interface"` +} + +// GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams defines parameters for GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion. +type GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams struct { + // VirtualMachineNetworkInterfaceId The network interface to get IP addresses for. All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. + VirtualMachineNetworkInterfaceId *string `form:"virtual_machine_network_interface[id],omitempty" json:"virtual_machine_network_interface[id],omitempty"` + + // AddressVersion The IP address version to return results for + AddressVersion IPAddressVersionEnum `form:"address_version" json:"address_version"` +} + +// PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONBody defines parameters for PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile. +type PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONBody struct { + // SpeedProfile All 'speed_profile[]' params are mutually exclusive, only one can be provided. + SpeedProfile NetworkSpeedProfileLookup `json:"speed_profile"` + + // VirtualMachineNetworkInterface All 'virtual_machine_network_interface[]' params are mutually exclusive, only one can be provided. + VirtualMachineNetworkInterface VirtualMachineNetworkInterfaceLookup `json:"virtual_machine_network_interface"` +} + +// GetVirtualMachinePackagesParams defines parameters for GetVirtualMachinePackages. +type GetVirtualMachinePackagesParams struct { + // OrganizationId Provide an organization to only show packages available to the given organization (otherwise only public packages will be displayed). All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationId *string `form:"organization[id],omitempty" json:"organization[id],omitempty"` + + // OrganizationSubDomain Provide an organization to only show packages available to the given organization (otherwise only public packages will be displayed). All 'organization[]' params are mutually exclusive, only one can be provided. + OrganizationSubDomain *string `form:"organization[sub_domain],omitempty" json:"organization[sub_domain],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetVirtualMachinePackageParams defines parameters for GetVirtualMachinePackage. +type GetVirtualMachinePackageParams struct { + // VirtualMachinePackageId All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. + VirtualMachinePackageId *string `form:"virtual_machine_package[id],omitempty" json:"virtual_machine_package[id],omitempty"` + + // VirtualMachinePackagePermalink All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. + VirtualMachinePackagePermalink *string `form:"virtual_machine_package[permalink],omitempty" json:"virtual_machine_package[permalink],omitempty"` +} + +// DeleteVirtualMachineJSONBody defines parameters for DeleteVirtualMachine. +type DeleteVirtualMachineJSONBody struct { + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine *VirtualMachineLookup `json:"virtual_machine,omitempty"` +} + +// GetVirtualMachineParams defines parameters for GetVirtualMachine. +type GetVirtualMachineParams struct { + // VirtualMachineId All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` + + // VirtualMachineFqdn All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` +} + +// PatchVirtualMachineJSONBody defines parameters for PatchVirtualMachine. +type PatchVirtualMachineJSONBody struct { + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties VirtualMachineArguments `json:"properties"` + + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// PostVirtualMachineAllocateIpJSONBody defines parameters for PostVirtualMachineAllocateIp. +type PostVirtualMachineAllocateIpJSONBody struct { + // IpAddress All 'ip_address[]' params are mutually exclusive, only one can be provided. + IpAddress IPAddressLookup `json:"ip_address"` + + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// PostVirtualMachineConsoleSessionsJSONBody defines parameters for PostVirtualMachineConsoleSessions. +type PostVirtualMachineConsoleSessionsJSONBody struct { + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// GetVirtualMachineDiskBackupPoliciesParams defines parameters for GetVirtualMachineDiskBackupPolicies. +type GetVirtualMachineDiskBackupPoliciesParams struct { + // VirtualMachineId The virtual machine to return disk backup policies for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` + + // VirtualMachineFqdn The virtual machine to return disk backup policies for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` + + // IncludeDisks If true, the returned list will include backup policies owned by disks assigned to this virtual machine in addition to those that belong to the whole virtual machine + IncludeDisks *bool `form:"include_disks,omitempty" json:"include_disks,omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostVirtualMachineDiskBackupPoliciesJSONBody defines parameters for PostVirtualMachineDiskBackupPolicies. +type PostVirtualMachineDiskBackupPoliciesJSONBody struct { + // Properties All 'properties[]' params are mutually exclusive, only one can be provided. + Properties DiskBackupPolicyArguments `json:"properties"` + + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// GetVirtualMachineDisksParams defines parameters for GetVirtualMachineDisks. +type GetVirtualMachineDisksParams struct { + // VirtualMachineId The virtual machine to find disks for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` + + // VirtualMachineFqdn The virtual machine to find disks for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PutVirtualMachineFlexibleResourcesJSONBody defines parameters for PutVirtualMachineFlexibleResources. +type PutVirtualMachineFlexibleResourcesJSONBody struct { + // Resources All 'resources[]' params are mutually exclusive, only one can be provided. + Resources VirtualMachineFlexibleResources `json:"resources"` + + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// GetVirtualMachineNetworkInterfacesParams defines parameters for GetVirtualMachineNetworkInterfaces. +type GetVirtualMachineNetworkInterfacesParams struct { + // VirtualMachineId The virtual machine to show network interfaces for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` + + // VirtualMachineFqdn The virtual machine to show network interfaces for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// GetVirtualMachineNetworkInterfaceParams defines parameters for GetVirtualMachineNetworkInterface. +type GetVirtualMachineNetworkInterfaceParams struct { + // VirtualMachineId The virtual machine to find the network interface for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineId *string `form:"virtual_machine[id],omitempty" json:"virtual_machine[id],omitempty"` + + // VirtualMachineFqdn The virtual machine to find the network interface for. All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachineFqdn *string `form:"virtual_machine[fqdn],omitempty" json:"virtual_machine[fqdn],omitempty"` + + // NetworkId The network to find the network interface for. All 'network[]' params are mutually exclusive, only one can be provided. + NetworkId *string `form:"network[id],omitempty" json:"network[id],omitempty"` + + // NetworkPermalink The network to find the network interface for. All 'network[]' params are mutually exclusive, only one can be provided. + NetworkPermalink *string `form:"network[permalink],omitempty" json:"network[permalink],omitempty"` +} + +// PutVirtualMachinePackageJSONBody defines parameters for PutVirtualMachinePackage. +type PutVirtualMachinePackageJSONBody struct { + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` + + // VirtualMachinePackage All 'virtual_machine_package[]' params are mutually exclusive, only one can be provided. + VirtualMachinePackage VirtualMachinePackageLookup `json:"virtual_machine_package"` +} + +// PostVirtualMachineResetJSONBody defines parameters for PostVirtualMachineReset. +type PostVirtualMachineResetJSONBody struct { + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// PostVirtualMachineShutdownJSONBody defines parameters for PostVirtualMachineShutdown. +type PostVirtualMachineShutdownJSONBody struct { + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// PostVirtualMachineStartJSONBody defines parameters for PostVirtualMachineStart. +type PostVirtualMachineStartJSONBody struct { + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// PostVirtualMachineStopJSONBody defines parameters for PostVirtualMachineStop. +type PostVirtualMachineStopJSONBody struct { + // VirtualMachine All 'virtual_machine[]' params are mutually exclusive, only one can be provided. + VirtualMachine VirtualMachineLookup `json:"virtual_machine"` +} + +// GetVirtualMachinesBuildsVirtualMachineBuildParams defines parameters for GetVirtualMachinesBuildsVirtualMachineBuild. +type GetVirtualMachinesBuildsVirtualMachineBuildParams struct { + // VirtualMachineBuildId All 'virtual_machine_build[]' params are mutually exclusive, only one can be provided. + VirtualMachineBuildId *string `form:"virtual_machine_build[id],omitempty" json:"virtual_machine_build[id],omitempty"` +} + +// GetZoneParams defines parameters for GetZone. +type GetZoneParams struct { + // ZoneId The zone to find. All 'zone[]' params are mutually exclusive, only one can be provided. + ZoneId *string `form:"zone[id],omitempty" json:"zone[id],omitempty"` + + // ZonePermalink The zone to find. All 'zone[]' params are mutually exclusive, only one can be provided. + ZonePermalink *string `form:"zone[permalink],omitempty" json:"zone[permalink],omitempty"` +} + +// DeleteAddressListEntryJSONRequestBody defines body for DeleteAddressListEntry for application/json ContentType. +type DeleteAddressListEntryJSONRequestBody DeleteAddressListEntryJSONBody + +// PatchAddressListEntryJSONRequestBody defines body for PatchAddressListEntry for application/json ContentType. +type PatchAddressListEntryJSONRequestBody PatchAddressListEntryJSONBody + +// DeleteAddressListJSONRequestBody defines body for DeleteAddressList for application/json ContentType. +type DeleteAddressListJSONRequestBody DeleteAddressListJSONBody + +// PatchAddressListJSONRequestBody defines body for PatchAddressList for application/json ContentType. +type PatchAddressListJSONRequestBody PatchAddressListJSONBody + +// PostAddressListEntriesJSONRequestBody defines body for PostAddressListEntries for application/json ContentType. +type PostAddressListEntriesJSONRequestBody PostAddressListEntriesJSONBody + +// DeleteDiskBackupPolicyJSONRequestBody defines body for DeleteDiskBackupPolicy for application/json ContentType. +type DeleteDiskBackupPolicyJSONRequestBody DeleteDiskBackupPolicyJSONBody + +// PatchDiskBackupPolicyJSONRequestBody defines body for PatchDiskBackupPolicy for application/json ContentType. +type PatchDiskBackupPolicyJSONRequestBody PatchDiskBackupPolicyJSONBody + +// DeleteDiskBackupPolicyScheduleJSONRequestBody defines body for DeleteDiskBackupPolicySchedule for application/json ContentType. +type DeleteDiskBackupPolicyScheduleJSONRequestBody DeleteDiskBackupPolicyScheduleJSONBody + +// PostDiskDiskBackupPoliciesJSONRequestBody defines body for PostDiskDiskBackupPolicies for application/json ContentType. +type PostDiskDiskBackupPoliciesJSONRequestBody PostDiskDiskBackupPoliciesJSONBody + +// DeleteDnsRecordJSONRequestBody defines body for DeleteDnsRecord for application/json ContentType. +type DeleteDnsRecordJSONRequestBody DeleteDnsRecordJSONBody + +// PatchDnsRecordJSONRequestBody defines body for PatchDnsRecord for application/json ContentType. +type PatchDnsRecordJSONRequestBody PatchDnsRecordJSONBody + +// DeleteDnsZoneJSONRequestBody defines body for DeleteDnsZone for application/json ContentType. +type DeleteDnsZoneJSONRequestBody DeleteDnsZoneJSONBody + +// PatchDnsZoneJSONRequestBody defines body for PatchDnsZone for application/json ContentType. +type PatchDnsZoneJSONRequestBody PatchDnsZoneJSONBody + +// PostDnsZoneRecordsJSONRequestBody defines body for PostDnsZoneRecords for application/json ContentType. +type PostDnsZoneRecordsJSONRequestBody PostDnsZoneRecordsJSONBody + +// PostDnsZoneVerifyJSONRequestBody defines body for PostDnsZoneVerify for application/json ContentType. +type PostDnsZoneVerifyJSONRequestBody PostDnsZoneVerifyJSONBody + +// DeleteFileStorageVolumeJSONRequestBody defines body for DeleteFileStorageVolume for application/json ContentType. +type DeleteFileStorageVolumeJSONRequestBody DeleteFileStorageVolumeJSONBody + +// PatchFileStorageVolumeJSONRequestBody defines body for PatchFileStorageVolume for application/json ContentType. +type PatchFileStorageVolumeJSONRequestBody PatchFileStorageVolumeJSONBody + +// PostInvalidateLinkedWebSessionJSONRequestBody defines body for PostInvalidateLinkedWebSession for application/json ContentType. +type PostInvalidateLinkedWebSessionJSONRequestBody = PostInvalidateLinkedWebSessionJSONBody + +// DeleteIpAddressJSONRequestBody defines body for DeleteIpAddress for application/json ContentType. +type DeleteIpAddressJSONRequestBody DeleteIpAddressJSONBody + +// PatchIpAddressJSONRequestBody defines body for PatchIpAddress for application/json ContentType. +type PatchIpAddressJSONRequestBody PatchIpAddressJSONBody + +// PostIpAddressUnallocateJSONRequestBody defines body for PostIpAddressUnallocate for application/json ContentType. +type PostIpAddressUnallocateJSONRequestBody PostIpAddressUnallocateJSONBody + +// DeleteLoadBalancerJSONRequestBody defines body for DeleteLoadBalancer for application/json ContentType. +type DeleteLoadBalancerJSONRequestBody DeleteLoadBalancerJSONBody + +// PatchLoadBalancerJSONRequestBody defines body for PatchLoadBalancer for application/json ContentType. +type PatchLoadBalancerJSONRequestBody PatchLoadBalancerJSONBody + +// PostLoadBalancerRulesJSONRequestBody defines body for PostLoadBalancerRules for application/json ContentType. +type PostLoadBalancerRulesJSONRequestBody PostLoadBalancerRulesJSONBody + +// DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody defines body for DeleteLoadBalancersRulesLoadBalancerRule for application/json ContentType. +type DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody DeleteLoadBalancersRulesLoadBalancerRuleJSONBody + +// PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody defines body for PatchLoadBalancersRulesLoadBalancerRule for application/json ContentType. +type PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody PatchLoadBalancersRulesLoadBalancerRuleJSONBody + +// PostOrganizationAddressListsJSONRequestBody defines body for PostOrganizationAddressLists for application/json ContentType. +type PostOrganizationAddressListsJSONRequestBody PostOrganizationAddressListsJSONBody + +// PostOrganizationDnsZonesJSONRequestBody defines body for PostOrganizationDnsZones for application/json ContentType. +type PostOrganizationDnsZonesJSONRequestBody PostOrganizationDnsZonesJSONBody + +// PostOrganizationFileStorageVolumesJSONRequestBody defines body for PostOrganizationFileStorageVolumes for application/json ContentType. +type PostOrganizationFileStorageVolumesJSONRequestBody PostOrganizationFileStorageVolumesJSONBody + +// PostOrganizationIpAddressesJSONRequestBody defines body for PostOrganizationIpAddresses for application/json ContentType. +type PostOrganizationIpAddressesJSONRequestBody PostOrganizationIpAddressesJSONBody + +// PostOrganizationLoadBalancersJSONRequestBody defines body for PostOrganizationLoadBalancers for application/json ContentType. +type PostOrganizationLoadBalancersJSONRequestBody PostOrganizationLoadBalancersJSONBody + +// PostOrganizationManagedJSONRequestBody defines body for PostOrganizationManaged for application/json ContentType. +type PostOrganizationManagedJSONRequestBody PostOrganizationManagedJSONBody + +// PostOrganizationSecurityGroupsJSONRequestBody defines body for PostOrganizationSecurityGroups for application/json ContentType. +type PostOrganizationSecurityGroupsJSONRequestBody PostOrganizationSecurityGroupsJSONBody + +// PostOrganizationSshKeysJSONRequestBody defines body for PostOrganizationSshKeys for application/json ContentType. +type PostOrganizationSshKeysJSONRequestBody PostOrganizationSshKeysJSONBody + +// PostOrganizationTagsJSONRequestBody defines body for PostOrganizationTags for application/json ContentType. +type PostOrganizationTagsJSONRequestBody PostOrganizationTagsJSONBody + +// PostOrganizationTrashObjectsPurgeAllJSONRequestBody defines body for PostOrganizationTrashObjectsPurgeAll for application/json ContentType. +type PostOrganizationTrashObjectsPurgeAllJSONRequestBody PostOrganizationTrashObjectsPurgeAllJSONBody + +// PostOrganizationVirtualMachineGroupsJSONRequestBody defines body for PostOrganizationVirtualMachineGroups for application/json ContentType. +type PostOrganizationVirtualMachineGroupsJSONRequestBody PostOrganizationVirtualMachineGroupsJSONBody + +// PostOrganizationVirtualMachinesBuildJSONRequestBody defines body for PostOrganizationVirtualMachinesBuild for application/json ContentType. +type PostOrganizationVirtualMachinesBuildJSONRequestBody PostOrganizationVirtualMachinesBuildJSONBody + +// PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody defines body for PostOrganizationVirtualMachinesBuildFromSpec for application/json ContentType. +type PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody PostOrganizationVirtualMachinesBuildFromSpecJSONBody + +// DeleteSecurityGroupJSONRequestBody defines body for DeleteSecurityGroup for application/json ContentType. +type DeleteSecurityGroupJSONRequestBody DeleteSecurityGroupJSONBody + +// PatchSecurityGroupJSONRequestBody defines body for PatchSecurityGroup for application/json ContentType. +type PatchSecurityGroupJSONRequestBody PatchSecurityGroupJSONBody + +// PostSecurityGroupRulesJSONRequestBody defines body for PostSecurityGroupRules for application/json ContentType. +type PostSecurityGroupRulesJSONRequestBody PostSecurityGroupRulesJSONBody + +// DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody defines body for DeleteSecurityGroupsRulesSecurityGroupRule for application/json ContentType. +type DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody DeleteSecurityGroupsRulesSecurityGroupRuleJSONBody + +// PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody defines body for PatchSecurityGroupsRulesSecurityGroupRule for application/json ContentType. +type PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody PatchSecurityGroupsRulesSecurityGroupRuleJSONBody + +// DeleteSshKeyJSONRequestBody defines body for DeleteSshKey for application/json ContentType. +type DeleteSshKeyJSONRequestBody DeleteSshKeyJSONBody + +// DeleteTagJSONRequestBody defines body for DeleteTag for application/json ContentType. +type DeleteTagJSONRequestBody DeleteTagJSONBody + +// PatchTagJSONRequestBody defines body for PatchTag for application/json ContentType. +type PatchTagJSONRequestBody PatchTagJSONBody + +// DeleteTrashObjectJSONRequestBody defines body for DeleteTrashObject for application/json ContentType. +type DeleteTrashObjectJSONRequestBody DeleteTrashObjectJSONBody + +// PostTrashObjectRestoreJSONRequestBody defines body for PostTrashObjectRestore for application/json ContentType. +type PostTrashObjectRestoreJSONRequestBody PostTrashObjectRestoreJSONBody + +// DeleteVirtualMachineGroupJSONRequestBody defines body for DeleteVirtualMachineGroup for application/json ContentType. +type DeleteVirtualMachineGroupJSONRequestBody DeleteVirtualMachineGroupJSONBody + +// PatchVirtualMachineGroupJSONRequestBody defines body for PatchVirtualMachineGroup for application/json ContentType. +type PatchVirtualMachineGroupJSONRequestBody PatchVirtualMachineGroupJSONBody + +// PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody defines body for PostVirtualMachineNetworkInterfaceAllocateIp for application/json ContentType. +type PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody PostVirtualMachineNetworkInterfaceAllocateIpJSONBody + +// PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody defines body for PostVirtualMachineNetworkInterfaceAllocateNewIp for application/json ContentType. +type PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody PostVirtualMachineNetworkInterfaceAllocateNewIpJSONBody + +// PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody defines body for PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile for application/json ContentType. +type PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONBody + +// DeleteVirtualMachineJSONRequestBody defines body for DeleteVirtualMachine for application/json ContentType. +type DeleteVirtualMachineJSONRequestBody DeleteVirtualMachineJSONBody + +// PatchVirtualMachineJSONRequestBody defines body for PatchVirtualMachine for application/json ContentType. +type PatchVirtualMachineJSONRequestBody PatchVirtualMachineJSONBody + +// PostVirtualMachineAllocateIpJSONRequestBody defines body for PostVirtualMachineAllocateIp for application/json ContentType. +type PostVirtualMachineAllocateIpJSONRequestBody PostVirtualMachineAllocateIpJSONBody + +// PostVirtualMachineConsoleSessionsJSONRequestBody defines body for PostVirtualMachineConsoleSessions for application/json ContentType. +type PostVirtualMachineConsoleSessionsJSONRequestBody PostVirtualMachineConsoleSessionsJSONBody + +// PostVirtualMachineDiskBackupPoliciesJSONRequestBody defines body for PostVirtualMachineDiskBackupPolicies for application/json ContentType. +type PostVirtualMachineDiskBackupPoliciesJSONRequestBody PostVirtualMachineDiskBackupPoliciesJSONBody + +// PutVirtualMachineFlexibleResourcesJSONRequestBody defines body for PutVirtualMachineFlexibleResources for application/json ContentType. +type PutVirtualMachineFlexibleResourcesJSONRequestBody PutVirtualMachineFlexibleResourcesJSONBody + +// PutVirtualMachinePackageJSONRequestBody defines body for PutVirtualMachinePackage for application/json ContentType. +type PutVirtualMachinePackageJSONRequestBody PutVirtualMachinePackageJSONBody + +// PostVirtualMachineResetJSONRequestBody defines body for PostVirtualMachineReset for application/json ContentType. +type PostVirtualMachineResetJSONRequestBody PostVirtualMachineResetJSONBody + +// PostVirtualMachineShutdownJSONRequestBody defines body for PostVirtualMachineShutdown for application/json ContentType. +type PostVirtualMachineShutdownJSONRequestBody PostVirtualMachineShutdownJSONBody + +// PostVirtualMachineStartJSONRequestBody defines body for PostVirtualMachineStart for application/json ContentType. +type PostVirtualMachineStartJSONRequestBody PostVirtualMachineStartJSONBody + +// PostVirtualMachineStopJSONRequestBody defines body for PostVirtualMachineStop for application/json ContentType. +type PostVirtualMachineStopJSONRequestBody PostVirtualMachineStopJSONBody + +// AsVirtualMachine returns the union data inside the DiskBackupPolicyTarget_Target as a VirtualMachine +func (t DiskBackupPolicyTarget_Target) AsVirtualMachine() (VirtualMachine, error) { + var body VirtualMachine + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachine overwrites any union data inside the DiskBackupPolicyTarget_Target as the provided VirtualMachine +func (t *DiskBackupPolicyTarget_Target) FromVirtualMachine(v VirtualMachine) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachine performs a merge with any union data inside the DiskBackupPolicyTarget_Target, using the provided VirtualMachine +func (t *DiskBackupPolicyTarget_Target) MergeVirtualMachine(v VirtualMachine) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDisk returns the union data inside the DiskBackupPolicyTarget_Target as a Disk +func (t DiskBackupPolicyTarget_Target) AsDisk() (Disk, error) { + var body Disk + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDisk overwrites any union data inside the DiskBackupPolicyTarget_Target as the provided Disk +func (t *DiskBackupPolicyTarget_Target) FromDisk(v Disk) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDisk performs a merge with any union data inside the DiskBackupPolicyTarget_Target, using the provided Disk +func (t *DiskBackupPolicyTarget_Target) MergeDisk(v Disk) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t DiskBackupPolicyTarget_Target) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *DiskBackupPolicyTarget_Target) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsVirtualMachine returns the union data inside the LoadBalancerResource_Resources as a VirtualMachine +func (t LoadBalancerResource_Resources) AsVirtualMachine() (VirtualMachine, error) { + var body VirtualMachine + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachine overwrites any union data inside the LoadBalancerResource_Resources as the provided VirtualMachine +func (t *LoadBalancerResource_Resources) FromVirtualMachine(v VirtualMachine) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachine performs a merge with any union data inside the LoadBalancerResource_Resources, using the provided VirtualMachine +func (t *LoadBalancerResource_Resources) MergeVirtualMachine(v VirtualMachine) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsVirtualMachineGroup returns the union data inside the LoadBalancerResource_Resources as a VirtualMachineGroup +func (t LoadBalancerResource_Resources) AsVirtualMachineGroup() (VirtualMachineGroup, error) { + var body VirtualMachineGroup + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachineGroup overwrites any union data inside the LoadBalancerResource_Resources as the provided VirtualMachineGroup +func (t *LoadBalancerResource_Resources) FromVirtualMachineGroup(v VirtualMachineGroup) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachineGroup performs a merge with any union data inside the LoadBalancerResource_Resources, using the provided VirtualMachineGroup +func (t *LoadBalancerResource_Resources) MergeVirtualMachineGroup(v VirtualMachineGroup) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsTag returns the union data inside the LoadBalancerResource_Resources as a Tag +func (t LoadBalancerResource_Resources) AsTag() (Tag, error) { + var body Tag + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromTag overwrites any union data inside the LoadBalancerResource_Resources as the provided Tag +func (t *LoadBalancerResource_Resources) FromTag(v Tag) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeTag performs a merge with any union data inside the LoadBalancerResource_Resources, using the provided Tag +func (t *LoadBalancerResource_Resources) MergeTag(v Tag) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t LoadBalancerResource_Resources) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *LoadBalancerResource_Resources) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfAPIAuthenticator403Response as a UnauthorizedNetworkForAPITokenSchema +func (t OneOfAPIAuthenticator403Response) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { + var body UnauthorizedNetworkForAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfAPIAuthenticator403Response as the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfAPIAuthenticator403Response) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfAPIAuthenticator403Response, using the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfAPIAuthenticator403Response) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidAPITokenSchema returns the union data inside the OneOfAPIAuthenticator403Response as a InvalidAPITokenSchema +func (t OneOfAPIAuthenticator403Response) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { + var body InvalidAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidAPITokenSchema overwrites any union data inside the OneOfAPIAuthenticator403Response as the provided InvalidAPITokenSchema +func (t *OneOfAPIAuthenticator403Response) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfAPIAuthenticator403Response, using the provided InvalidAPITokenSchema +func (t *OneOfAPIAuthenticator403Response) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfAPIAuthenticator403Response as a ScopeNotGrantedErrorSchema +func (t OneOfAPIAuthenticator403Response) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { + var body ScopeNotGrantedErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfAPIAuthenticator403Response as the provided ScopeNotGrantedErrorSchema +func (t *OneOfAPIAuthenticator403Response) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfAPIAuthenticator403Response, using the provided ScopeNotGrantedErrorSchema +func (t *OneOfAPIAuthenticator403Response) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfAPIAuthenticator403Response) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfAPIAuthenticator403Response) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsOrganizationNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a OrganizationNotFoundSchema +func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsOrganizationNotFoundSchema() (OrganizationNotFoundSchema, error) { + var body OrganizationNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided OrganizationNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided OrganizationNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsZoneNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a ZoneNotFoundSchema +func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsZoneNotFoundSchema() (ZoneNotFoundSchema, error) { + var body ZoneNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromZoneNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided ZoneNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromZoneNotFoundSchema(v ZoneNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeZoneNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided ZoneNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeZoneNotFoundSchema(v ZoneNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDataCenterNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a DataCenterNotFoundSchema +func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsDataCenterNotFoundSchema() (DataCenterNotFoundSchema, error) { + var body DataCenterNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDataCenterNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided DataCenterNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromDataCenterNotFoundSchema(v DataCenterNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDataCenterNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided DataCenterNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeDataCenterNotFoundSchema(v DataCenterNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsVirtualMachinePackageNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a VirtualMachinePackageNotFoundSchema +func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsVirtualMachinePackageNotFoundSchema() (VirtualMachinePackageNotFoundSchema, error) { + var body VirtualMachinePackageNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachinePackageNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided VirtualMachinePackageNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachinePackageNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided VirtualMachinePackageNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsDiskTemplateNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a DiskTemplateNotFoundSchema +func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsDiskTemplateNotFoundSchema() (DiskTemplateNotFoundSchema, error) { + var body DiskTemplateNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromDiskTemplateNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided DiskTemplateNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromDiskTemplateNotFoundSchema(v DiskTemplateNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeDiskTemplateNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided DiskTemplateNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeDiskTemplateNotFoundSchema(v DiskTemplateNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsNetworkNotFoundSchema returns the union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as a NetworkNotFoundSchema +func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) AsNetworkNotFoundSchema() (NetworkNotFoundSchema, error) { + var body NetworkNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromNetworkNotFoundSchema overwrites any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res as the provided NetworkNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) FromNetworkNotFoundSchema(v NetworkNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeNetworkNotFoundSchema performs a merge with any union data inside the OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res, using the provided NetworkNotFoundSchema +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MergeNetworkNotFoundSchema(v NetworkNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfDataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a UnauthorizedNetworkForAPITokenSchema +func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { + var body UnauthorizedNetworkForAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidAPITokenSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a InvalidAPITokenSchema +func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { + var body InvalidAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidAPITokenSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided InvalidAPITokenSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided InvalidAPITokenSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a ScopeNotGrantedErrorSchema +func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { + var body ScopeNotGrantedErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided ScopeNotGrantedErrorSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided ScopeNotGrantedErrorSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsPermissionDeniedSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a PermissionDeniedSchema +func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { + var body PermissionDeniedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromPermissionDeniedSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided PermissionDeniedSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided PermissionDeniedSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsFlexibleResourcesUnavailableToOrganizationSchema returns the union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as a FlexibleResourcesUnavailableToOrganizationSchema +func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) AsFlexibleResourcesUnavailableToOrganizationSchema() (FlexibleResourcesUnavailableToOrganizationSchema, error) { + var body FlexibleResourcesUnavailableToOrganizationSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromFlexibleResourcesUnavailableToOrganizationSchema overwrites any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res as the provided FlexibleResourcesUnavailableToOrganizationSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) FromFlexibleResourcesUnavailableToOrganizationSchema(v FlexibleResourcesUnavailableToOrganizationSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeFlexibleResourcesUnavailableToOrganizationSchema performs a merge with any union data inside the OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res, using the provided FlexibleResourcesUnavailableToOrganizationSchema +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MergeFlexibleResourcesUnavailableToOrganizationSchema(v FlexibleResourcesUnavailableToOrganizationSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfFlexibleResourcesUnavailableToOrganizationPermissionDenied403Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsVirtualMachineNetworkInterfaceNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a VirtualMachineNetworkInterfaceNotFoundSchema +func (t OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsVirtualMachineNetworkInterfaceNotFoundSchema() (VirtualMachineNetworkInterfaceNotFoundSchema, error) { + var body VirtualMachineNetworkInterfaceNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachineNetworkInterfaceNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided VirtualMachineNetworkInterfaceNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachineNetworkInterfaceNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided VirtualMachineNetworkInterfaceNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsIPAddressNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a IPAddressNotFoundSchema +func (t OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsIPAddressNotFoundSchema() (IPAddressNotFoundSchema, error) { + var body IPAddressNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIPAddressNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided IPAddressNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIPAddressNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided IPAddressNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfIPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsVirtualMachineNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as a VirtualMachineNotFoundSchema +func (t OneOfIPAddressNotFoundVirtualMachineNotFound404Res) AsVirtualMachineNotFoundSchema() (VirtualMachineNotFoundSchema, error) { + var body VirtualMachineNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachineNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as the provided VirtualMachineNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) FromVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachineNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res, using the provided VirtualMachineNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) MergeVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsIPAddressNotFoundSchema returns the union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as a IPAddressNotFoundSchema +func (t OneOfIPAddressNotFoundVirtualMachineNotFound404Res) AsIPAddressNotFoundSchema() (IPAddressNotFoundSchema, error) { + var body IPAddressNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIPAddressNotFoundSchema overwrites any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res as the provided IPAddressNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) FromIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIPAddressNotFoundSchema performs a merge with any union data inside the OneOfIPAddressNotFoundVirtualMachineNotFound404Res, using the provided IPAddressNotFoundSchema +func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) MergeIPAddressNotFoundSchema(v IPAddressNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfIPAddressNotFoundVirtualMachineNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfIPAddressNotFoundVirtualMachineNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsIPAlreadyAllocatedSchema returns the union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as a IPAlreadyAllocatedSchema +func (t OneOfIPAlreadyAllocatedInvalidIP422Res) AsIPAlreadyAllocatedSchema() (IPAlreadyAllocatedSchema, error) { + var body IPAlreadyAllocatedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIPAlreadyAllocatedSchema overwrites any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as the provided IPAlreadyAllocatedSchema +func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) FromIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIPAlreadyAllocatedSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res, using the provided IPAlreadyAllocatedSchema +func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) MergeIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidIPSchema returns the union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as a InvalidIPSchema +func (t OneOfIPAlreadyAllocatedInvalidIP422Res) AsInvalidIPSchema() (InvalidIPSchema, error) { + var body InvalidIPSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidIPSchema overwrites any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res as the provided InvalidIPSchema +func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) FromInvalidIPSchema(v InvalidIPSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidIPSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedInvalidIP422Res, using the provided InvalidIPSchema +func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) MergeInvalidIPSchema(v InvalidIPSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfIPAlreadyAllocatedInvalidIP422Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfIPAlreadyAllocatedInvalidIP422Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsNoInterfaceAvailableSchema returns the union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as a NoInterfaceAvailableSchema +func (t OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) AsNoInterfaceAvailableSchema() (NoInterfaceAvailableSchema, error) { + var body NoInterfaceAvailableSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromNoInterfaceAvailableSchema overwrites any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as the provided NoInterfaceAvailableSchema +func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) FromNoInterfaceAvailableSchema(v NoInterfaceAvailableSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeNoInterfaceAvailableSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res, using the provided NoInterfaceAvailableSchema +func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) MergeNoInterfaceAvailableSchema(v NoInterfaceAvailableSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsIPAlreadyAllocatedSchema returns the union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as a IPAlreadyAllocatedSchema +func (t OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) AsIPAlreadyAllocatedSchema() (IPAlreadyAllocatedSchema, error) { + var body IPAlreadyAllocatedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIPAlreadyAllocatedSchema overwrites any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res as the provided IPAlreadyAllocatedSchema +func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) FromIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIPAlreadyAllocatedSchema performs a merge with any union data inside the OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res, using the provided IPAlreadyAllocatedSchema +func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) MergeIPAlreadyAllocatedSchema(v IPAlreadyAllocatedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfIPAlreadyAllocatedNoInterfaceAvailable422Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsAPIAuthenticator400Schema returns the union data inside the OneOfIdentityNotLinkedToWebSession400Res as a APIAuthenticator400Schema +func (t OneOfIdentityNotLinkedToWebSession400Res) AsAPIAuthenticator400Schema() (APIAuthenticator400Schema, error) { + var body APIAuthenticator400Schema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAPIAuthenticator400Schema overwrites any union data inside the OneOfIdentityNotLinkedToWebSession400Res as the provided APIAuthenticator400Schema +func (t *OneOfIdentityNotLinkedToWebSession400Res) FromAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAPIAuthenticator400Schema performs a merge with any union data inside the OneOfIdentityNotLinkedToWebSession400Res, using the provided APIAuthenticator400Schema +func (t *OneOfIdentityNotLinkedToWebSession400Res) MergeAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsIdentityNotLinkedToWebSessionSchema returns the union data inside the OneOfIdentityNotLinkedToWebSession400Res as a IdentityNotLinkedToWebSessionSchema +func (t OneOfIdentityNotLinkedToWebSession400Res) AsIdentityNotLinkedToWebSessionSchema() (IdentityNotLinkedToWebSessionSchema, error) { + var body IdentityNotLinkedToWebSessionSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromIdentityNotLinkedToWebSessionSchema overwrites any union data inside the OneOfIdentityNotLinkedToWebSession400Res as the provided IdentityNotLinkedToWebSessionSchema +func (t *OneOfIdentityNotLinkedToWebSession400Res) FromIdentityNotLinkedToWebSessionSchema(v IdentityNotLinkedToWebSessionSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeIdentityNotLinkedToWebSessionSchema performs a merge with any union data inside the OneOfIdentityNotLinkedToWebSession400Res, using the provided IdentityNotLinkedToWebSessionSchema +func (t *OneOfIdentityNotLinkedToWebSession400Res) MergeIdentityNotLinkedToWebSessionSchema(v IdentityNotLinkedToWebSessionSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfIdentityNotLinkedToWebSession400Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfIdentityNotLinkedToWebSession400Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsVirtualMachineNotFoundSchema returns the union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as a VirtualMachineNotFoundSchema +func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) AsVirtualMachineNotFoundSchema() (VirtualMachineNotFoundSchema, error) { + var body VirtualMachineNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachineNotFoundSchema overwrites any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as the provided VirtualMachineNotFoundSchema +func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) FromVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachineNotFoundSchema performs a merge with any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res, using the provided VirtualMachineNotFoundSchema +func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MergeVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsNetworkNotFoundSchema returns the union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as a NetworkNotFoundSchema +func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) AsNetworkNotFoundSchema() (NetworkNotFoundSchema, error) { + var body NetworkNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromNetworkNotFoundSchema overwrites any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as the provided NetworkNotFoundSchema +func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) FromNetworkNotFoundSchema(v NetworkNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeNetworkNotFoundSchema performs a merge with any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res, using the provided NetworkNotFoundSchema +func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MergeNetworkNotFoundSchema(v NetworkNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInterfaceNotFoundSchema returns the union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as a InterfaceNotFoundSchema +func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) AsInterfaceNotFoundSchema() (InterfaceNotFoundSchema, error) { + var body InterfaceNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInterfaceNotFoundSchema overwrites any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res as the provided InterfaceNotFoundSchema +func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) FromInterfaceNotFoundSchema(v InterfaceNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInterfaceNotFoundSchema performs a merge with any union data inside the OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res, using the provided InterfaceNotFoundSchema +func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MergeInterfaceNotFoundSchema(v InterfaceNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfInterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsAPIAuthenticator400Schema returns the union data inside the OneOfInvalidSpecXML400Res as a APIAuthenticator400Schema +func (t OneOfInvalidSpecXML400Res) AsAPIAuthenticator400Schema() (APIAuthenticator400Schema, error) { + var body APIAuthenticator400Schema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAPIAuthenticator400Schema overwrites any union data inside the OneOfInvalidSpecXML400Res as the provided APIAuthenticator400Schema +func (t *OneOfInvalidSpecXML400Res) FromAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAPIAuthenticator400Schema performs a merge with any union data inside the OneOfInvalidSpecXML400Res, using the provided APIAuthenticator400Schema +func (t *OneOfInvalidSpecXML400Res) MergeAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidSpecXMLSchema returns the union data inside the OneOfInvalidSpecXML400Res as a InvalidSpecXMLSchema +func (t OneOfInvalidSpecXML400Res) AsInvalidSpecXMLSchema() (InvalidSpecXMLSchema, error) { + var body InvalidSpecXMLSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidSpecXMLSchema overwrites any union data inside the OneOfInvalidSpecXML400Res as the provided InvalidSpecXMLSchema +func (t *OneOfInvalidSpecXML400Res) FromInvalidSpecXMLSchema(v InvalidSpecXMLSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidSpecXMLSchema performs a merge with any union data inside the OneOfInvalidSpecXML400Res, using the provided InvalidSpecXMLSchema +func (t *OneOfInvalidSpecXML400Res) MergeInvalidSpecXMLSchema(v InvalidSpecXMLSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfInvalidSpecXML400Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfInvalidSpecXML400Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsAPIAuthenticator400Schema returns the union data inside the OneOfInvalidTimestamp400Res as a APIAuthenticator400Schema +func (t OneOfInvalidTimestamp400Res) AsAPIAuthenticator400Schema() (APIAuthenticator400Schema, error) { + var body APIAuthenticator400Schema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromAPIAuthenticator400Schema overwrites any union data inside the OneOfInvalidTimestamp400Res as the provided APIAuthenticator400Schema +func (t *OneOfInvalidTimestamp400Res) FromAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeAPIAuthenticator400Schema performs a merge with any union data inside the OneOfInvalidTimestamp400Res, using the provided APIAuthenticator400Schema +func (t *OneOfInvalidTimestamp400Res) MergeAPIAuthenticator400Schema(v APIAuthenticator400Schema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidTimestampSchema returns the union data inside the OneOfInvalidTimestamp400Res as a InvalidTimestampSchema +func (t OneOfInvalidTimestamp400Res) AsInvalidTimestampSchema() (InvalidTimestampSchema, error) { + var body InvalidTimestampSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidTimestampSchema overwrites any union data inside the OneOfInvalidTimestamp400Res as the provided InvalidTimestampSchema +func (t *OneOfInvalidTimestamp400Res) FromInvalidTimestampSchema(v InvalidTimestampSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidTimestampSchema performs a merge with any union data inside the OneOfInvalidTimestamp400Res, using the provided InvalidTimestampSchema +func (t *OneOfInvalidTimestamp400Res) MergeInvalidTimestampSchema(v InvalidTimestampSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfInvalidTimestamp400Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfInvalidTimestamp400Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsValidationErrorSchema returns the union data inside the OneOfLocationRequiredValidationError422Res as a ValidationErrorSchema +func (t OneOfLocationRequiredValidationError422Res) AsValidationErrorSchema() (ValidationErrorSchema, error) { + var body ValidationErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromValidationErrorSchema overwrites any union data inside the OneOfLocationRequiredValidationError422Res as the provided ValidationErrorSchema +func (t *OneOfLocationRequiredValidationError422Res) FromValidationErrorSchema(v ValidationErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeValidationErrorSchema performs a merge with any union data inside the OneOfLocationRequiredValidationError422Res, using the provided ValidationErrorSchema +func (t *OneOfLocationRequiredValidationError422Res) MergeValidationErrorSchema(v ValidationErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsLocationRequiredSchema returns the union data inside the OneOfLocationRequiredValidationError422Res as a LocationRequiredSchema +func (t OneOfLocationRequiredValidationError422Res) AsLocationRequiredSchema() (LocationRequiredSchema, error) { + var body LocationRequiredSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromLocationRequiredSchema overwrites any union data inside the OneOfLocationRequiredValidationError422Res as the provided LocationRequiredSchema +func (t *OneOfLocationRequiredValidationError422Res) FromLocationRequiredSchema(v LocationRequiredSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeLocationRequiredSchema performs a merge with any union data inside the OneOfLocationRequiredValidationError422Res, using the provided LocationRequiredSchema +func (t *OneOfLocationRequiredValidationError422Res) MergeLocationRequiredSchema(v LocationRequiredSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfLocationRequiredValidationError422Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfLocationRequiredValidationError422Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsOrganizationNotFoundSchema returns the union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as a OrganizationNotFoundSchema +func (t OneOfNetworkNotFoundOrganizationNotFound404Res) AsOrganizationNotFoundSchema() (OrganizationNotFoundSchema, error) { + var body OrganizationNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationNotFoundSchema overwrites any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as the provided OrganizationNotFoundSchema +func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) FromOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationNotFoundSchema performs a merge with any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res, using the provided OrganizationNotFoundSchema +func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) MergeOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsNetworkNotFoundSchema returns the union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as a NetworkNotFoundSchema +func (t OneOfNetworkNotFoundOrganizationNotFound404Res) AsNetworkNotFoundSchema() (NetworkNotFoundSchema, error) { + var body NetworkNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromNetworkNotFoundSchema overwrites any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res as the provided NetworkNotFoundSchema +func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) FromNetworkNotFoundSchema(v NetworkNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeNetworkNotFoundSchema performs a merge with any union data inside the OneOfNetworkNotFoundOrganizationNotFound404Res, using the provided NetworkNotFoundSchema +func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) MergeNetworkNotFoundSchema(v NetworkNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfNetworkNotFoundOrganizationNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfNetworkNotFoundOrganizationNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsVirtualMachineNetworkInterfaceNotFoundSchema returns the union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a VirtualMachineNetworkInterfaceNotFoundSchema +func (t OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsVirtualMachineNetworkInterfaceNotFoundSchema() (VirtualMachineNetworkInterfaceNotFoundSchema, error) { + var body VirtualMachineNetworkInterfaceNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachineNetworkInterfaceNotFoundSchema overwrites any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided VirtualMachineNetworkInterfaceNotFoundSchema +func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachineNetworkInterfaceNotFoundSchema performs a merge with any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided VirtualMachineNetworkInterfaceNotFoundSchema +func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeVirtualMachineNetworkInterfaceNotFoundSchema(v VirtualMachineNetworkInterfaceNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsNetworkSpeedProfileNotFoundSchema returns the union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as a NetworkSpeedProfileNotFoundSchema +func (t OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) AsNetworkSpeedProfileNotFoundSchema() (NetworkSpeedProfileNotFoundSchema, error) { + var body NetworkSpeedProfileNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromNetworkSpeedProfileNotFoundSchema overwrites any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res as the provided NetworkSpeedProfileNotFoundSchema +func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) FromNetworkSpeedProfileNotFoundSchema(v NetworkSpeedProfileNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeNetworkSpeedProfileNotFoundSchema performs a merge with any union data inside the OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res, using the provided NetworkSpeedProfileNotFoundSchema +func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MergeNetworkSpeedProfileNotFoundSchema(v NetworkSpeedProfileNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfNetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsObjectInTrashSchema returns the union data inside the OneOfObjectInTrashTaskQueueingError406Res as a ObjectInTrashSchema +func (t OneOfObjectInTrashTaskQueueingError406Res) AsObjectInTrashSchema() (ObjectInTrashSchema, error) { + var body ObjectInTrashSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromObjectInTrashSchema overwrites any union data inside the OneOfObjectInTrashTaskQueueingError406Res as the provided ObjectInTrashSchema +func (t *OneOfObjectInTrashTaskQueueingError406Res) FromObjectInTrashSchema(v ObjectInTrashSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeObjectInTrashSchema performs a merge with any union data inside the OneOfObjectInTrashTaskQueueingError406Res, using the provided ObjectInTrashSchema +func (t *OneOfObjectInTrashTaskQueueingError406Res) MergeObjectInTrashSchema(v ObjectInTrashSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsTaskQueueingErrorSchema returns the union data inside the OneOfObjectInTrashTaskQueueingError406Res as a TaskQueueingErrorSchema +func (t OneOfObjectInTrashTaskQueueingError406Res) AsTaskQueueingErrorSchema() (TaskQueueingErrorSchema, error) { + var body TaskQueueingErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromTaskQueueingErrorSchema overwrites any union data inside the OneOfObjectInTrashTaskQueueingError406Res as the provided TaskQueueingErrorSchema +func (t *OneOfObjectInTrashTaskQueueingError406Res) FromTaskQueueingErrorSchema(v TaskQueueingErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeTaskQueueingErrorSchema performs a merge with any union data inside the OneOfObjectInTrashTaskQueueingError406Res, using the provided TaskQueueingErrorSchema +func (t *OneOfObjectInTrashTaskQueueingError406Res) MergeTaskQueueingErrorSchema(v TaskQueueingErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfObjectInTrashTaskQueueingError406Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfObjectInTrashTaskQueueingError406Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsObjectInTrashSchema returns the union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as a ObjectInTrashSchema +func (t OneOfObjectInTrashVirtualMachineMustBeStarted406Res) AsObjectInTrashSchema() (ObjectInTrashSchema, error) { + var body ObjectInTrashSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromObjectInTrashSchema overwrites any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as the provided ObjectInTrashSchema +func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) FromObjectInTrashSchema(v ObjectInTrashSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeObjectInTrashSchema performs a merge with any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res, using the provided ObjectInTrashSchema +func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) MergeObjectInTrashSchema(v ObjectInTrashSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsVirtualMachineMustBeStartedSchema returns the union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as a VirtualMachineMustBeStartedSchema +func (t OneOfObjectInTrashVirtualMachineMustBeStarted406Res) AsVirtualMachineMustBeStartedSchema() (VirtualMachineMustBeStartedSchema, error) { + var body VirtualMachineMustBeStartedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachineMustBeStartedSchema overwrites any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res as the provided VirtualMachineMustBeStartedSchema +func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) FromVirtualMachineMustBeStartedSchema(v VirtualMachineMustBeStartedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachineMustBeStartedSchema performs a merge with any union data inside the OneOfObjectInTrashVirtualMachineMustBeStarted406Res, using the provided VirtualMachineMustBeStartedSchema +func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) MergeVirtualMachineMustBeStartedSchema(v VirtualMachineMustBeStartedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfObjectInTrashVirtualMachineMustBeStarted406Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfObjectInTrashVirtualMachineMustBeStarted406Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsOrganizationNotFoundSchema returns the union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as a OrganizationNotFoundSchema +func (t OneOfOperatingSystemNotFoundOrganizationNotFound404Res) AsOrganizationNotFoundSchema() (OrganizationNotFoundSchema, error) { + var body OrganizationNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationNotFoundSchema overwrites any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as the provided OrganizationNotFoundSchema +func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) FromOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationNotFoundSchema performs a merge with any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res, using the provided OrganizationNotFoundSchema +func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) MergeOrganizationNotFoundSchema(v OrganizationNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsOperatingSystemNotFoundSchema returns the union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as a OperatingSystemNotFoundSchema +func (t OneOfOperatingSystemNotFoundOrganizationNotFound404Res) AsOperatingSystemNotFoundSchema() (OperatingSystemNotFoundSchema, error) { + var body OperatingSystemNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOperatingSystemNotFoundSchema overwrites any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res as the provided OperatingSystemNotFoundSchema +func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) FromOperatingSystemNotFoundSchema(v OperatingSystemNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOperatingSystemNotFoundSchema performs a merge with any union data inside the OneOfOperatingSystemNotFoundOrganizationNotFound404Res, using the provided OperatingSystemNotFoundSchema +func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) MergeOperatingSystemNotFoundSchema(v OperatingSystemNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfOperatingSystemNotFoundOrganizationNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfOperatingSystemNotFoundOrganizationNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsOrganizationLimitReachedSchema returns the union data inside the OneOfOrganizationLimitReachedValidationError422Res as a OrganizationLimitReachedSchema +func (t OneOfOrganizationLimitReachedValidationError422Res) AsOrganizationLimitReachedSchema() (OrganizationLimitReachedSchema, error) { + var body OrganizationLimitReachedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationLimitReachedSchema overwrites any union data inside the OneOfOrganizationLimitReachedValidationError422Res as the provided OrganizationLimitReachedSchema +func (t *OneOfOrganizationLimitReachedValidationError422Res) FromOrganizationLimitReachedSchema(v OrganizationLimitReachedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationLimitReachedSchema performs a merge with any union data inside the OneOfOrganizationLimitReachedValidationError422Res, using the provided OrganizationLimitReachedSchema +func (t *OneOfOrganizationLimitReachedValidationError422Res) MergeOrganizationLimitReachedSchema(v OrganizationLimitReachedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsValidationErrorSchema returns the union data inside the OneOfOrganizationLimitReachedValidationError422Res as a ValidationErrorSchema +func (t OneOfOrganizationLimitReachedValidationError422Res) AsValidationErrorSchema() (ValidationErrorSchema, error) { + var body ValidationErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromValidationErrorSchema overwrites any union data inside the OneOfOrganizationLimitReachedValidationError422Res as the provided ValidationErrorSchema +func (t *OneOfOrganizationLimitReachedValidationError422Res) FromValidationErrorSchema(v ValidationErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeValidationErrorSchema performs a merge with any union data inside the OneOfOrganizationLimitReachedValidationError422Res, using the provided ValidationErrorSchema +func (t *OneOfOrganizationLimitReachedValidationError422Res) MergeValidationErrorSchema(v ValidationErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfOrganizationLimitReachedValidationError422Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfOrganizationLimitReachedValidationError422Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a UnauthorizedNetworkForAPITokenSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { + var body UnauthorizedNetworkForAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a InvalidAPITokenSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { + var body InvalidAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided InvalidAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided InvalidAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a ScopeNotGrantedErrorSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { + var body ScopeNotGrantedErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided ScopeNotGrantedErrorSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided ScopeNotGrantedErrorSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsOrganizationSuspendedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a OrganizationSuspendedSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsOrganizationSuspendedSchema() (OrganizationSuspendedSchema, error) { + var body OrganizationSuspendedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationSuspendedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided OrganizationSuspendedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationSuspendedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided OrganizationSuspendedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsOrganizationNotActivatedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as a OrganizationNotActivatedSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) AsOrganizationNotActivatedSchema() (OrganizationNotActivatedSchema, error) { + var body OrganizationNotActivatedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationNotActivatedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res as the provided OrganizationNotActivatedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) FromOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationNotActivatedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspended403Res, using the provided OrganizationNotActivatedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) MergeOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfOrganizationNotActivatedOrganizationSuspended403Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfOrganizationNotActivatedOrganizationSuspended403Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a UnauthorizedNetworkForAPITokenSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { + var body UnauthorizedNetworkForAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a InvalidAPITokenSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { + var body InvalidAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided InvalidAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided InvalidAPITokenSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a ScopeNotGrantedErrorSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { + var body ScopeNotGrantedErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided ScopeNotGrantedErrorSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided ScopeNotGrantedErrorSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsOrganizationSuspendedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a OrganizationSuspendedSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsOrganizationSuspendedSchema() (OrganizationSuspendedSchema, error) { + var body OrganizationSuspendedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationSuspendedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided OrganizationSuspendedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationSuspendedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided OrganizationSuspendedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsOrganizationNotActivatedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a OrganizationNotActivatedSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsOrganizationNotActivatedSchema() (OrganizationNotActivatedSchema, error) { + var body OrganizationNotActivatedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationNotActivatedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided OrganizationNotActivatedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationNotActivatedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided OrganizationNotActivatedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergeOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsPermissionDeniedSchema returns the union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as a PermissionDeniedSchema +func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { + var body PermissionDeniedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromPermissionDeniedSchema overwrites any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res as the provided PermissionDeniedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res, using the provided PermissionDeniedSchema +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfOrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a UnauthorizedNetworkForAPITokenSchema +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { + var body UnauthorizedNetworkForAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidAPITokenSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a InvalidAPITokenSchema +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { + var body InvalidAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidAPITokenSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided InvalidAPITokenSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided InvalidAPITokenSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a ScopeNotGrantedErrorSchema +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { + var body ScopeNotGrantedErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided ScopeNotGrantedErrorSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided ScopeNotGrantedErrorSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsOrganizationSuspendedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a OrganizationSuspendedSchema +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsOrganizationSuspendedSchema() (OrganizationSuspendedSchema, error) { + var body OrganizationSuspendedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationSuspendedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided OrganizationSuspendedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationSuspendedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided OrganizationSuspendedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeOrganizationSuspendedSchema(v OrganizationSuspendedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsOrganizationNotActivatedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a OrganizationNotActivatedSchema +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsOrganizationNotActivatedSchema() (OrganizationNotActivatedSchema, error) { + var body OrganizationNotActivatedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromOrganizationNotActivatedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided OrganizationNotActivatedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeOrganizationNotActivatedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided OrganizationNotActivatedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeOrganizationNotActivatedSchema(v OrganizationNotActivatedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsPermissionDeniedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a PermissionDeniedSchema +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { + var body PermissionDeniedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromPermissionDeniedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided PermissionDeniedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided PermissionDeniedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsResourceCreationRestrictedSchema returns the union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as a ResourceCreationRestrictedSchema +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) AsResourceCreationRestrictedSchema() (ResourceCreationRestrictedSchema, error) { + var body ResourceCreationRestrictedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromResourceCreationRestrictedSchema overwrites any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res as the provided ResourceCreationRestrictedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) FromResourceCreationRestrictedSchema(v ResourceCreationRestrictedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeResourceCreationRestrictedSchema performs a merge with any union data inside the OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res, using the provided ResourceCreationRestrictedSchema +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MergeResourceCreationRestrictedSchema(v ResourceCreationRestrictedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfOrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsUnauthorizedNetworkForAPITokenSchema returns the union data inside the OneOfPermissionDenied403Res as a UnauthorizedNetworkForAPITokenSchema +func (t OneOfPermissionDenied403Res) AsUnauthorizedNetworkForAPITokenSchema() (UnauthorizedNetworkForAPITokenSchema, error) { + var body UnauthorizedNetworkForAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromUnauthorizedNetworkForAPITokenSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfPermissionDenied403Res) FromUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeUnauthorizedNetworkForAPITokenSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided UnauthorizedNetworkForAPITokenSchema +func (t *OneOfPermissionDenied403Res) MergeUnauthorizedNetworkForAPITokenSchema(v UnauthorizedNetworkForAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidAPITokenSchema returns the union data inside the OneOfPermissionDenied403Res as a InvalidAPITokenSchema +func (t OneOfPermissionDenied403Res) AsInvalidAPITokenSchema() (InvalidAPITokenSchema, error) { + var body InvalidAPITokenSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidAPITokenSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided InvalidAPITokenSchema +func (t *OneOfPermissionDenied403Res) FromInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidAPITokenSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided InvalidAPITokenSchema +func (t *OneOfPermissionDenied403Res) MergeInvalidAPITokenSchema(v InvalidAPITokenSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsScopeNotGrantedErrorSchema returns the union data inside the OneOfPermissionDenied403Res as a ScopeNotGrantedErrorSchema +func (t OneOfPermissionDenied403Res) AsScopeNotGrantedErrorSchema() (ScopeNotGrantedErrorSchema, error) { + var body ScopeNotGrantedErrorSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromScopeNotGrantedErrorSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided ScopeNotGrantedErrorSchema +func (t *OneOfPermissionDenied403Res) FromScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeScopeNotGrantedErrorSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided ScopeNotGrantedErrorSchema +func (t *OneOfPermissionDenied403Res) MergeScopeNotGrantedErrorSchema(v ScopeNotGrantedErrorSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsPermissionDeniedSchema returns the union data inside the OneOfPermissionDenied403Res as a PermissionDeniedSchema +func (t OneOfPermissionDenied403Res) AsPermissionDeniedSchema() (PermissionDeniedSchema, error) { + var body PermissionDeniedSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromPermissionDeniedSchema overwrites any union data inside the OneOfPermissionDenied403Res as the provided PermissionDeniedSchema +func (t *OneOfPermissionDenied403Res) FromPermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergePermissionDeniedSchema performs a merge with any union data inside the OneOfPermissionDenied403Res, using the provided PermissionDeniedSchema +func (t *OneOfPermissionDenied403Res) MergePermissionDeniedSchema(v PermissionDeniedSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfPermissionDenied403Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfPermissionDenied403Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsVirtualMachineNotFoundSchema returns the union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as a VirtualMachineNotFoundSchema +func (t OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) AsVirtualMachineNotFoundSchema() (VirtualMachineNotFoundSchema, error) { + var body VirtualMachineNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachineNotFoundSchema overwrites any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as the provided VirtualMachineNotFoundSchema +func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) FromVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachineNotFoundSchema performs a merge with any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res, using the provided VirtualMachineNotFoundSchema +func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) MergeVirtualMachineNotFoundSchema(v VirtualMachineNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsVirtualMachinePackageNotFoundSchema returns the union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as a VirtualMachinePackageNotFoundSchema +func (t OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) AsVirtualMachinePackageNotFoundSchema() (VirtualMachinePackageNotFoundSchema, error) { + var body VirtualMachinePackageNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromVirtualMachinePackageNotFoundSchema overwrites any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res as the provided VirtualMachinePackageNotFoundSchema +func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) FromVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeVirtualMachinePackageNotFoundSchema performs a merge with any union data inside the OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res, using the provided VirtualMachinePackageNotFoundSchema +func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) MergeVirtualMachinePackageNotFoundSchema(v VirtualMachinePackageNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfVirtualMachineNotFoundVirtualMachinePackageNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +const ( + clientVersion = "0.2.0" // x-release-please-version +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, token string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + + bearerTokenProvider, bearerTokenProviderErr := securityprovider.NewSecurityProviderBearerToken(token) + if bearerTokenProviderErr != nil { + return nil, bearerTokenProviderErr + } + + client.RequestEditors = append(client.RequestEditors, bearerTokenProvider.Intercept) + client.RequestEditors = append(client.RequestEditors, func(ctx context.Context, req *http.Request) error { + req.Header.Set("User-Agent", "go-katapult/"+clientVersion) + + return nil + }) + + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // DeleteAddressListEntryWithBody request with any body + DeleteAddressListEntryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteAddressListEntry(ctx context.Context, body DeleteAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddressListEntry request + GetAddressListEntry(ctx context.Context, params *GetAddressListEntryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchAddressListEntryWithBody request with any body + PatchAddressListEntryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchAddressListEntry(ctx context.Context, body PatchAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddressLists request + GetAddressLists(ctx context.Context, params *GetAddressListsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteAddressListWithBody request with any body + DeleteAddressListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteAddressList(ctx context.Context, body DeleteAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddressList request + GetAddressList(ctx context.Context, params *GetAddressListParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchAddressListWithBody request with any body + PatchAddressListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchAddressList(ctx context.Context, body PatchAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetAddressListEntries request + GetAddressListEntries(ctx context.Context, params *GetAddressListEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostAddressListEntriesWithBody request with any body + PostAddressListEntriesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostAddressListEntries(ctx context.Context, body PostAddressListEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCertificate request + GetCertificate(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCountries request + GetCountries(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCountry request + GetCountry(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCountryCountryStates request + GetCountryCountryStates(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCountryState request + GetCountryState(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCurrencies request + GetCurrencies(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetCurrency request + GetCurrency(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDataCenters request + GetDataCenters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDataCenter request + GetDataCenter(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDataCenterDefaultNetwork request + GetDataCenterDefaultNetwork(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDataCenterGpuTypes request + GetDataCenterGpuTypes(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteDiskBackupPolicyWithBody request with any body + DeleteDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteDiskBackupPolicy(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDiskBackupPolicy request + GetDiskBackupPolicy(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchDiskBackupPolicyWithBody request with any body + PatchDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchDiskBackupPolicy(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteDiskBackupPolicyScheduleWithBody request with any body + DeleteDiskBackupPolicyScheduleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteDiskBackupPolicySchedule(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDiskTemplateVersion request + GetDiskTemplateVersion(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDiskTemplateVersionSpec request + GetDiskTemplateVersionSpec(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDiskTemplate request + GetDiskTemplate(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDiskTemplateVersions request + GetDiskTemplateVersions(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDisk request + GetDisk(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDiskDiskBackupPolicies request + GetDiskDiskBackupPolicies(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostDiskDiskBackupPoliciesWithBody request with any body + PostDiskDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostDiskDiskBackupPolicies(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteDnsRecordWithBody request with any body + DeleteDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteDnsRecord(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDnsRecord request + GetDnsRecord(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchDnsRecordWithBody request with any body + PatchDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchDnsRecord(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteDnsZoneWithBody request with any body + DeleteDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteDnsZone(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDnsZone request + GetDnsZone(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchDnsZoneWithBody request with any body + PatchDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchDnsZone(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetDnsZoneRecords request + GetDnsZoneRecords(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostDnsZoneRecordsWithBody request with any body + PostDnsZoneRecordsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostDnsZoneRecords(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostDnsZoneVerifyWithBody request with any body + PostDnsZoneVerifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostDnsZoneVerify(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteFileStorageVolumeWithBody request with any body + DeleteFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteFileStorageVolume(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetFileStorageVolume request + GetFileStorageVolume(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchFileStorageVolumeWithBody request with any body + PatchFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchFileStorageVolume(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetGpuTypes request + GetGpuTypes(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetGpuType request + GetGpuType(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostInvalidateLinkedWebSessionWithBody request with any body + PostInvalidateLinkedWebSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostInvalidateLinkedWebSession(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteIpAddressWithBody request with any body + DeleteIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteIpAddress(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetIpAddress request + GetIpAddress(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchIpAddressWithBody request with any body + PatchIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchIpAddress(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostIpAddressUnallocateWithBody request with any body + PostIpAddressUnallocateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostIpAddressUnallocate(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteLoadBalancerWithBody request with any body + DeleteLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteLoadBalancer(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetLoadBalancer request + GetLoadBalancer(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchLoadBalancerWithBody request with any body + PatchLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchLoadBalancer(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetLoadBalancerRules request + GetLoadBalancerRules(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostLoadBalancerRulesWithBody request with any body + PostLoadBalancerRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostLoadBalancerRules(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteLoadBalancersRulesLoadBalancerRuleWithBody request with any body + DeleteLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteLoadBalancersRulesLoadBalancerRule(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetLoadBalancersRulesLoadBalancerRule request + GetLoadBalancersRulesLoadBalancerRule(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchLoadBalancersRulesLoadBalancerRuleWithBody request with any body + PatchLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchLoadBalancersRulesLoadBalancerRule(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetNetwork request + GetNetwork(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOperatingSystems request + GetOperatingSystems(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOperatingSystem request + GetOperatingSystem(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizations request + GetOrganizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganization request + GetOrganization(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationAddressLists request + GetOrganizationAddressLists(ctx context.Context, params *GetOrganizationAddressListsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationAddressListsWithBody request with any body + PostOrganizationAddressListsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationAddressLists(ctx context.Context, body PostOrganizationAddressListsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationAvailableNetworks request + GetOrganizationAvailableNetworks(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationCertificates request + GetOrganizationCertificates(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationDiskBackupPolicies request + GetOrganizationDiskBackupPolicies(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationDiskTemplates request + GetOrganizationDiskTemplates(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationDisks request + GetOrganizationDisks(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationDnsZones request + GetOrganizationDnsZones(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationDnsZonesWithBody request with any body + PostOrganizationDnsZonesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationDnsZones(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationDnsZonesNameservers request + GetOrganizationDnsZonesNameservers(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationFileStorageVolumes request + GetOrganizationFileStorageVolumes(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationFileStorageVolumesWithBody request with any body + PostOrganizationFileStorageVolumesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationFileStorageVolumes(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationIpAddresses request + GetOrganizationIpAddresses(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationIpAddressesWithBody request with any body + PostOrganizationIpAddressesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationIpAddresses(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationLoadBalancers request + GetOrganizationLoadBalancers(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationLoadBalancersWithBody request with any body + PostOrganizationLoadBalancersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationLoadBalancers(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationManaged request + GetOrganizationManaged(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationManagedWithBody request with any body + PostOrganizationManagedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationManaged(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationNetworkSpeedProfiles request + GetOrganizationNetworkSpeedProfiles(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationPolicyLimits request + GetOrganizationPolicyLimits(ctx context.Context, params *GetOrganizationPolicyLimitsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationSecurityGroups request + GetOrganizationSecurityGroups(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationSecurityGroupsWithBody request with any body + PostOrganizationSecurityGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationSecurityGroups(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationSshKeys request + GetOrganizationSshKeys(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationSshKeysWithBody request with any body + PostOrganizationSshKeysWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationSshKeys(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationTags request + GetOrganizationTags(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationTagsWithBody request with any body + PostOrganizationTagsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationTags(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationTrashObjects request + GetOrganizationTrashObjects(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationTrashObjectsPurgeAllWithBody request with any body + PostOrganizationTrashObjectsPurgeAllWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationTrashObjectsPurgeAll(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationUsersWithAccess request + GetOrganizationUsersWithAccess(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationVirtualMachineGroups request + GetOrganizationVirtualMachineGroups(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationVirtualMachineGroupsWithBody request with any body + PostOrganizationVirtualMachineGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationVirtualMachineGroups(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetOrganizationVirtualMachines request + GetOrganizationVirtualMachines(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationVirtualMachinesBuildWithBody request with any body + PostOrganizationVirtualMachinesBuildWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationVirtualMachinesBuild(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostOrganizationVirtualMachinesBuildFromSpecWithBody request with any body + PostOrganizationVirtualMachinesBuildFromSpecWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostOrganizationVirtualMachinesBuildFromSpec(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSecurityGroupWithBody request with any body + DeleteSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteSecurityGroup(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSecurityGroup request + GetSecurityGroup(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchSecurityGroupWithBody request with any body + PatchSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchSecurityGroup(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSecurityGroupRules request + GetSecurityGroupRules(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostSecurityGroupRulesWithBody request with any body + PostSecurityGroupRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostSecurityGroupRules(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSecurityGroupsRulesSecurityGroupRuleWithBody request with any body + DeleteSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetSecurityGroupsRulesSecurityGroupRule request + GetSecurityGroupsRulesSecurityGroupRule(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchSecurityGroupsRulesSecurityGroupRuleWithBody request with any body + PatchSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteSshKeyWithBody request with any body + DeleteSshKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteSshKey(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteTagWithBody request with any body + DeleteTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteTag(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTag request + GetTag(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchTagWithBody request with any body + PatchTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchTag(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTask request + GetTask(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteTrashObjectWithBody request with any body + DeleteTrashObjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteTrashObject(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetTrashObject request + GetTrashObject(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostTrashObjectRestoreWithBody request with any body + PostTrashObjectRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostTrashObjectRestore(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetUsersCurrent request + GetUsersCurrent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachineAuthorizedKeys request + GetVirtualMachineAuthorizedKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteVirtualMachineGroupWithBody request with any body + DeleteVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteVirtualMachineGroup(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachineGroup request + GetVirtualMachineGroup(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchVirtualMachineGroupWithBody request with any body + PatchVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchVirtualMachineGroup(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVMNIVMNI request + GetVMNIVMNI(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineNetworkInterfaceAllocateIpWithBody request with any body + PostVirtualMachineNetworkInterfaceAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineNetworkInterfaceAllocateIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody request with any body + PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineNetworkInterfaceAllocateNewIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion request + GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody request with any body + PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachinePackages request + GetVirtualMachinePackages(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachinePackage request + GetVirtualMachinePackage(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // DeleteVirtualMachineWithBody request with any body + DeleteVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + DeleteVirtualMachine(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachine request + GetVirtualMachine(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PatchVirtualMachineWithBody request with any body + PatchVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PatchVirtualMachine(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineAllocateIpWithBody request with any body + PostVirtualMachineAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineAllocateIp(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineConsoleSessionsWithBody request with any body + PostVirtualMachineConsoleSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineConsoleSessions(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachineDiskBackupPolicies request + GetVirtualMachineDiskBackupPolicies(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineDiskBackupPoliciesWithBody request with any body + PostVirtualMachineDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineDiskBackupPolicies(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachineDisks request + GetVirtualMachineDisks(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutVirtualMachineFlexibleResourcesWithBody request with any body + PutVirtualMachineFlexibleResourcesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutVirtualMachineFlexibleResources(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachineNetworkInterfaces request + GetVirtualMachineNetworkInterfaces(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachineNetworkInterface request + GetVirtualMachineNetworkInterface(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PutVirtualMachinePackageWithBody request with any body + PutVirtualMachinePackageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PutVirtualMachinePackage(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineResetWithBody request with any body + PostVirtualMachineResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineReset(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineShutdownWithBody request with any body + PostVirtualMachineShutdownWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineShutdown(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineStartWithBody request with any body + PostVirtualMachineStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineStart(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostVirtualMachineStopWithBody request with any body + PostVirtualMachineStopWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostVirtualMachineStop(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachinesBuildsVirtualMachineBuild request + GetVirtualMachinesBuildsVirtualMachineBuild(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetZones request + GetZones(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetZone request + GetZone(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) DeleteAddressListEntryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddressListEntryRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteAddressListEntry(ctx context.Context, body DeleteAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddressListEntryRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetAddressListEntry(ctx context.Context, params *GetAddressListEntryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddressListEntryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchAddressListEntryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchAddressListEntryRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchAddressListEntry(ctx context.Context, body PatchAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchAddressListEntryRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetAddressLists(ctx context.Context, params *GetAddressListsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddressListsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteAddressListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddressListRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteAddressList(ctx context.Context, body DeleteAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAddressListRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetAddressList(ctx context.Context, params *GetAddressListParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddressListRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchAddressListWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchAddressListRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchAddressList(ctx context.Context, body PatchAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchAddressListRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetAddressListEntries(ctx context.Context, params *GetAddressListEntriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAddressListEntriesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostAddressListEntriesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostAddressListEntriesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostAddressListEntries(ctx context.Context, body PostAddressListEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostAddressListEntriesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCertificate(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCertificateRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCountries(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCountriesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCountry(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCountryRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCountryCountryStates(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCountryCountryStatesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCountryState(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCountryStateRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCurrencies(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrenciesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetCurrency(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetCurrencyRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDataCenters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDataCentersRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDataCenter(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDataCenterRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDataCenterDefaultNetwork(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDataCenterDefaultNetworkRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDataCenterGpuTypes(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDataCenterGpuTypesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDiskBackupPolicyRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDiskBackupPolicy(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDiskBackupPolicyRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDiskBackupPolicy(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiskBackupPolicyRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchDiskBackupPolicyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchDiskBackupPolicyRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchDiskBackupPolicy(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchDiskBackupPolicyRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDiskBackupPolicyScheduleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDiskBackupPolicyScheduleRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDiskBackupPolicySchedule(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDiskBackupPolicyScheduleRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDiskTemplateVersion(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiskTemplateVersionRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDiskTemplateVersionSpec(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiskTemplateVersionSpecRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDiskTemplate(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiskTemplateRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDiskTemplateVersions(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiskTemplateVersionsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDisk(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiskRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDiskDiskBackupPolicies(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDiskDiskBackupPoliciesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostDiskDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostDiskDiskBackupPoliciesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostDiskDiskBackupPolicies(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostDiskDiskBackupPoliciesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDnsRecordRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDnsRecord(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDnsRecordRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDnsRecord(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDnsRecordRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchDnsRecordWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchDnsRecordRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchDnsRecord(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchDnsRecordRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDnsZoneRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteDnsZone(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteDnsZoneRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDnsZone(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDnsZoneRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchDnsZoneWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchDnsZoneRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchDnsZone(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchDnsZoneRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetDnsZoneRecords(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDnsZoneRecordsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostDnsZoneRecordsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostDnsZoneRecordsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostDnsZoneRecords(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostDnsZoneRecordsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostDnsZoneVerifyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostDnsZoneVerifyRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostDnsZoneVerify(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostDnsZoneVerifyRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteFileStorageVolumeRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteFileStorageVolume(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteFileStorageVolumeRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetFileStorageVolume(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetFileStorageVolumeRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchFileStorageVolumeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchFileStorageVolumeRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchFileStorageVolume(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchFileStorageVolumeRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetGpuTypes(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetGpuTypesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetGpuType(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetGpuTypeRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostInvalidateLinkedWebSessionWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostInvalidateLinkedWebSessionRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostInvalidateLinkedWebSession(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostInvalidateLinkedWebSessionRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteIpAddressRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteIpAddress(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteIpAddressRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetIpAddress(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetIpAddressRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchIpAddressWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchIpAddressRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchIpAddress(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchIpAddressRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostIpAddressUnallocateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostIpAddressUnallocateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostIpAddressUnallocate(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostIpAddressUnallocateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteLoadBalancerRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteLoadBalancer(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteLoadBalancerRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetLoadBalancer(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetLoadBalancerRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchLoadBalancerWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchLoadBalancerRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchLoadBalancer(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchLoadBalancerRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetLoadBalancerRules(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetLoadBalancerRulesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostLoadBalancerRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostLoadBalancerRulesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostLoadBalancerRules(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostLoadBalancerRulesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteLoadBalancersRulesLoadBalancerRule(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteLoadBalancersRulesLoadBalancerRuleRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetLoadBalancersRulesLoadBalancerRule(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetLoadBalancersRulesLoadBalancerRuleRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchLoadBalancersRulesLoadBalancerRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchLoadBalancersRulesLoadBalancerRule(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchLoadBalancersRulesLoadBalancerRuleRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetNetwork(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetNetworkRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOperatingSystems(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOperatingSystemsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOperatingSystem(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOperatingSystemRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizations(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganization(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationAddressLists(ctx context.Context, params *GetOrganizationAddressListsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationAddressListsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationAddressListsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationAddressListsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationAddressLists(ctx context.Context, body PostOrganizationAddressListsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationAddressListsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationAvailableNetworks(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationAvailableNetworksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationCertificates(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationCertificatesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationDiskBackupPolicies(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationDiskBackupPoliciesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationDiskTemplates(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationDiskTemplatesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationDisks(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationDisksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationDnsZones(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationDnsZonesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationDnsZonesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationDnsZonesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationDnsZones(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationDnsZonesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationDnsZonesNameservers(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationDnsZonesNameserversRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationFileStorageVolumes(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationFileStorageVolumesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationFileStorageVolumesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationFileStorageVolumesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationFileStorageVolumes(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationFileStorageVolumesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationIpAddresses(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationIpAddressesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationIpAddressesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationIpAddressesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationIpAddresses(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationIpAddressesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationLoadBalancers(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationLoadBalancersRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationLoadBalancersWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationLoadBalancersRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationLoadBalancers(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationLoadBalancersRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationManaged(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationManagedRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationManagedWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationManagedRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationManaged(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationManagedRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationNetworkSpeedProfiles(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationNetworkSpeedProfilesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationPolicyLimits(ctx context.Context, params *GetOrganizationPolicyLimitsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationPolicyLimitsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationSecurityGroups(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationSecurityGroupsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationSecurityGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationSecurityGroupsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationSecurityGroups(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationSecurityGroupsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationSshKeys(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationSshKeysRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationSshKeysWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationSshKeysRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationSshKeys(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationSshKeysRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationTags(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationTagsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationTagsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationTagsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationTags(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationTagsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationTrashObjects(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationTrashObjectsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationTrashObjectsPurgeAllWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationTrashObjectsPurgeAllRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationTrashObjectsPurgeAll(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationTrashObjectsPurgeAllRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationUsersWithAccess(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationUsersWithAccessRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationVirtualMachineGroups(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationVirtualMachineGroupsRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationVirtualMachineGroupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationVirtualMachineGroupsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationVirtualMachineGroups(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationVirtualMachineGroupsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetOrganizationVirtualMachines(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetOrganizationVirtualMachinesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationVirtualMachinesBuildWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationVirtualMachinesBuildRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationVirtualMachinesBuild(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationVirtualMachinesBuildRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationVirtualMachinesBuildFromSpecWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostOrganizationVirtualMachinesBuildFromSpec(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostOrganizationVirtualMachinesBuildFromSpecRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSecurityGroupRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSecurityGroup(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSecurityGroupRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSecurityGroup(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSecurityGroupRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchSecurityGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchSecurityGroupRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchSecurityGroup(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchSecurityGroupRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSecurityGroupRules(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSecurityGroupRulesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostSecurityGroupRulesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostSecurityGroupRulesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostSecurityGroupRules(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostSecurityGroupRulesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSecurityGroupsRulesSecurityGroupRuleRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetSecurityGroupsRulesSecurityGroupRule(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetSecurityGroupsRulesSecurityGroupRuleRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchSecurityGroupsRulesSecurityGroupRuleWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchSecurityGroupsRulesSecurityGroupRule(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchSecurityGroupsRulesSecurityGroupRuleRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSshKeyWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSshKeyRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteSshKey(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteSshKeyRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTagRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteTag(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTagRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTag(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTagRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchTagWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchTagRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchTag(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchTagRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTask(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTaskRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteTrashObjectWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTrashObjectRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteTrashObject(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteTrashObjectRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetTrashObject(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTrashObjectRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostTrashObjectRestoreWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostTrashObjectRestoreRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostTrashObjectRestore(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostTrashObjectRestoreRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetUsersCurrent(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetUsersCurrentRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachineAuthorizedKeys(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineAuthorizedKeysRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteVirtualMachineGroupRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteVirtualMachineGroup(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteVirtualMachineGroupRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachineGroup(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineGroupRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchVirtualMachineGroupWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchVirtualMachineGroupRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchVirtualMachineGroup(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchVirtualMachineGroupRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVMNIVMNI(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVMNIVMNIRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineNetworkInterfaceAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineNetworkInterfaceAllocateIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineNetworkInterfaceAllocateIpRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineNetworkInterfaceAllocateNewIp(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachinePackages(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachinePackagesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachinePackage(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachinePackageRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteVirtualMachineRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) DeleteVirtualMachine(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteVirtualMachineRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachine(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchVirtualMachineWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchVirtualMachineRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PatchVirtualMachine(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPatchVirtualMachineRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineAllocateIpWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineAllocateIpRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineAllocateIp(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineAllocateIpRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineConsoleSessionsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineConsoleSessionsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineConsoleSessions(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineConsoleSessionsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachineDiskBackupPolicies(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineDiskBackupPoliciesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineDiskBackupPoliciesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineDiskBackupPoliciesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineDiskBackupPolicies(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineDiskBackupPoliciesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachineDisks(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineDisksRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutVirtualMachineFlexibleResourcesWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutVirtualMachineFlexibleResourcesRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutVirtualMachineFlexibleResources(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutVirtualMachineFlexibleResourcesRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachineNetworkInterfaces(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineNetworkInterfacesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachineNetworkInterface(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachineNetworkInterfaceRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutVirtualMachinePackageWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutVirtualMachinePackageRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PutVirtualMachinePackage(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPutVirtualMachinePackageRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineResetWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineResetRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineReset(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineResetRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineShutdownWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineShutdownRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineShutdown(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineShutdownRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineStartWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineStartRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineStart(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineStartRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineStopWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineStopRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostVirtualMachineStop(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostVirtualMachineStopRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachinesBuildsVirtualMachineBuild(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachinesBuildsVirtualMachineBuildRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetZones(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetZonesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetZone(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetZoneRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewDeleteAddressListEntryRequest calls the generic DeleteAddressListEntry builder with application/json body +func NewDeleteAddressListEntryRequest(server string, body DeleteAddressListEntryJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteAddressListEntryRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteAddressListEntryRequestWithBody generates requests for DeleteAddressListEntry with any type of body +func NewDeleteAddressListEntryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_list_entries/:address_list_entry") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetAddressListEntryRequest generates requests for GetAddressListEntry +func NewGetAddressListEntryRequest(server string, params *GetAddressListEntryParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_list_entries/:address_list_entry") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.AddressListEntryId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "address_list_entry[id]", runtime.ParamLocationQuery, *params.AddressListEntryId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchAddressListEntryRequest calls the generic PatchAddressListEntry builder with application/json body +func NewPatchAddressListEntryRequest(server string, body PatchAddressListEntryJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchAddressListEntryRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchAddressListEntryRequestWithBody generates requests for PatchAddressListEntry with any type of body +func NewPatchAddressListEntryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_list_entries/:address_list_entry") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetAddressListsRequest generates requests for GetAddressLists +func NewGetAddressListsRequest(server string, params *GetAddressListsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_lists") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteAddressListRequest calls the generic DeleteAddressList builder with application/json body +func NewDeleteAddressListRequest(server string, body DeleteAddressListJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteAddressListRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteAddressListRequestWithBody generates requests for DeleteAddressList with any type of body +func NewDeleteAddressListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_lists/:address_list") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetAddressListRequest generates requests for GetAddressList +func NewGetAddressListRequest(server string, params *GetAddressListParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_lists/:address_list") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.AddressListId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "address_list[id]", runtime.ParamLocationQuery, *params.AddressListId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchAddressListRequest calls the generic PatchAddressList builder with application/json body +func NewPatchAddressListRequest(server string, body PatchAddressListJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchAddressListRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchAddressListRequestWithBody generates requests for PatchAddressList with any type of body +func NewPatchAddressListRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_lists/:address_list") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetAddressListEntriesRequest generates requests for GetAddressListEntries +func NewGetAddressListEntriesRequest(server string, params *GetAddressListEntriesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_lists/:address_list/entries") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.AddressListId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "address_list[id]", runtime.ParamLocationQuery, *params.AddressListId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostAddressListEntriesRequest calls the generic PostAddressListEntries builder with application/json body +func NewPostAddressListEntriesRequest(server string, body PostAddressListEntriesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostAddressListEntriesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostAddressListEntriesRequestWithBody generates requests for PostAddressListEntries with any type of body +func NewPostAddressListEntriesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/address_lists/:address_list/entries") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetCertificateRequest generates requests for GetCertificate +func NewGetCertificateRequest(server string, params *GetCertificateParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/certificates/:certificate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CertificateId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "certificate[id]", runtime.ParamLocationQuery, *params.CertificateId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCountriesRequest generates requests for GetCountries +func NewGetCountriesRequest(server string, params *GetCountriesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/countries") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCountryRequest generates requests for GetCountry +func NewGetCountryRequest(server string, params *GetCountryParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/countries/:country") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CountryId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[id]", runtime.ParamLocationQuery, *params.CountryId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CountryIsoCode2 != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code2]", runtime.ParamLocationQuery, *params.CountryIsoCode2); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CountryIsoCode3 != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code3]", runtime.ParamLocationQuery, *params.CountryIsoCode3); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCountryCountryStatesRequest generates requests for GetCountryCountryStates +func NewGetCountryCountryStatesRequest(server string, params *GetCountryCountryStatesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/countries/:country/country_states") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CountryId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[id]", runtime.ParamLocationQuery, *params.CountryId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CountryIsoCode2 != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code2]", runtime.ParamLocationQuery, *params.CountryIsoCode2); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CountryIsoCode3 != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country[iso_code3]", runtime.ParamLocationQuery, *params.CountryIsoCode3); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCountryStateRequest generates requests for GetCountryState +func NewGetCountryStateRequest(server string, params *GetCountryStateParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/country_states/:country_state") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CountryStateId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "country_state[id]", runtime.ParamLocationQuery, *params.CountryStateId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCurrenciesRequest generates requests for GetCurrencies +func NewGetCurrenciesRequest(server string, params *GetCurrenciesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/currencies") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetCurrencyRequest generates requests for GetCurrency +func NewGetCurrencyRequest(server string, params *GetCurrencyParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/currencies/:currency") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.CurrencyId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "currency[id]", runtime.ParamLocationQuery, *params.CurrencyId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.CurrencyIsoCode != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "currency[iso_code]", runtime.ParamLocationQuery, *params.CurrencyIsoCode); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDataCentersRequest generates requests for GetDataCenters +func NewGetDataCentersRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/data_centers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDataCenterRequest generates requests for GetDataCenter +func NewGetDataCenterRequest(server string, params *GetDataCenterParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/data_centers/:data_center") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DataCenterId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[id]", runtime.ParamLocationQuery, *params.DataCenterId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DataCenterPermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[permalink]", runtime.ParamLocationQuery, *params.DataCenterPermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDataCenterDefaultNetworkRequest generates requests for GetDataCenterDefaultNetwork +func NewGetDataCenterDefaultNetworkRequest(server string, params *GetDataCenterDefaultNetworkParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/data_centers/:data_center/default_network") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DataCenterId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[id]", runtime.ParamLocationQuery, *params.DataCenterId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DataCenterPermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[permalink]", runtime.ParamLocationQuery, *params.DataCenterPermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDataCenterGpuTypesRequest generates requests for GetDataCenterGpuTypes +func NewGetDataCenterGpuTypesRequest(server string, params *GetDataCenterGpuTypesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/data_centers/:data_center/gpu_types") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DataCenterId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[id]", runtime.ParamLocationQuery, *params.DataCenterId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DataCenterPermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "data_center[permalink]", runtime.ParamLocationQuery, *params.DataCenterPermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteDiskBackupPolicyRequest calls the generic DeleteDiskBackupPolicy builder with application/json body +func NewDeleteDiskBackupPolicyRequest(server string, body DeleteDiskBackupPolicyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteDiskBackupPolicyRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteDiskBackupPolicyRequestWithBody generates requests for DeleteDiskBackupPolicy with any type of body +func NewDeleteDiskBackupPolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetDiskBackupPolicyRequest generates requests for GetDiskBackupPolicy +func NewGetDiskBackupPolicyRequest(server string, params *GetDiskBackupPolicyParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DiskBackupPolicyId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_backup_policy[id]", runtime.ParamLocationQuery, *params.DiskBackupPolicyId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchDiskBackupPolicyRequest calls the generic PatchDiskBackupPolicy builder with application/json body +func NewPatchDiskBackupPolicyRequest(server string, body PatchDiskBackupPolicyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchDiskBackupPolicyRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchDiskBackupPolicyRequestWithBody generates requests for PatchDiskBackupPolicy with any type of body +func NewPatchDiskBackupPolicyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteDiskBackupPolicyScheduleRequest calls the generic DeleteDiskBackupPolicySchedule builder with application/json body +func NewDeleteDiskBackupPolicyScheduleRequest(server string, body DeleteDiskBackupPolicyScheduleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteDiskBackupPolicyScheduleRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteDiskBackupPolicyScheduleRequestWithBody generates requests for DeleteDiskBackupPolicySchedule with any type of body +func NewDeleteDiskBackupPolicyScheduleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_backup_policies/:disk_backup_policy/schedule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetDiskTemplateVersionRequest generates requests for GetDiskTemplateVersion +func NewGetDiskTemplateVersionRequest(server string, params *GetDiskTemplateVersionParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_template_versions/:disk_template_version") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DiskTemplateVersionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template_version[id]", runtime.ParamLocationQuery, *params.DiskTemplateVersionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDiskTemplateVersionSpecRequest generates requests for GetDiskTemplateVersionSpec +func NewGetDiskTemplateVersionSpecRequest(server string, params *GetDiskTemplateVersionSpecParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_template_versions/:disk_template_version/spec") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DiskTemplateVersionId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template_version[id]", runtime.ParamLocationQuery, *params.DiskTemplateVersionId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDiskTemplateRequest generates requests for GetDiskTemplate +func NewGetDiskTemplateRequest(server string, params *GetDiskTemplateParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_templates/:disk_template") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DiskTemplateId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[id]", runtime.ParamLocationQuery, *params.DiskTemplateId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DiskTemplatePermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[permalink]", runtime.ParamLocationQuery, *params.DiskTemplatePermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDiskTemplateVersionsRequest generates requests for GetDiskTemplateVersions +func NewGetDiskTemplateVersionsRequest(server string, params *GetDiskTemplateVersionsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disk_templates/:disk_template/versions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DiskTemplateId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[id]", runtime.ParamLocationQuery, *params.DiskTemplateId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DiskTemplatePermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk_template[permalink]", runtime.ParamLocationQuery, *params.DiskTemplatePermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDiskRequest generates requests for GetDisk +func NewGetDiskRequest(server string, params *GetDiskParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disks/:disk") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DiskId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk[id]", runtime.ParamLocationQuery, *params.DiskId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetDiskDiskBackupPoliciesRequest generates requests for GetDiskDiskBackupPolicies +func NewGetDiskDiskBackupPoliciesRequest(server string, params *GetDiskDiskBackupPoliciesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disks/:disk/disk_backup_policies") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DiskId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "disk[id]", runtime.ParamLocationQuery, *params.DiskId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostDiskDiskBackupPoliciesRequest calls the generic PostDiskDiskBackupPolicies builder with application/json body +func NewPostDiskDiskBackupPoliciesRequest(server string, body PostDiskDiskBackupPoliciesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostDiskDiskBackupPoliciesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostDiskDiskBackupPoliciesRequestWithBody generates requests for PostDiskDiskBackupPolicies with any type of body +func NewPostDiskDiskBackupPoliciesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/disks/:disk/disk_backup_policies") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteDnsRecordRequest calls the generic DeleteDnsRecord builder with application/json body +func NewDeleteDnsRecordRequest(server string, body DeleteDnsRecordJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteDnsRecordRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteDnsRecordRequestWithBody generates requests for DeleteDnsRecord with any type of body +func NewDeleteDnsRecordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_records/:dns_record") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetDnsRecordRequest generates requests for GetDnsRecord +func NewGetDnsRecordRequest(server string, params *GetDnsRecordParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_records/:dns_record") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DnsRecordId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_record[id]", runtime.ParamLocationQuery, *params.DnsRecordId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchDnsRecordRequest calls the generic PatchDnsRecord builder with application/json body +func NewPatchDnsRecordRequest(server string, body PatchDnsRecordJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchDnsRecordRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchDnsRecordRequestWithBody generates requests for PatchDnsRecord with any type of body +func NewPatchDnsRecordRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_records/:dns_record") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteDnsZoneRequest calls the generic DeleteDnsZone builder with application/json body +func NewDeleteDnsZoneRequest(server string, body DeleteDnsZoneJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteDnsZoneRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteDnsZoneRequestWithBody generates requests for DeleteDnsZone with any type of body +func NewDeleteDnsZoneRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_zones/:dns_zone") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetDnsZoneRequest generates requests for GetDnsZone +func NewGetDnsZoneRequest(server string, params *GetDnsZoneParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_zones/:dns_zone") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DnsZoneId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[id]", runtime.ParamLocationQuery, *params.DnsZoneId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DnsZoneName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[name]", runtime.ParamLocationQuery, *params.DnsZoneName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchDnsZoneRequest calls the generic PatchDnsZone builder with application/json body +func NewPatchDnsZoneRequest(server string, body PatchDnsZoneJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchDnsZoneRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchDnsZoneRequestWithBody generates requests for PatchDnsZone with any type of body +func NewPatchDnsZoneRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_zones/:dns_zone") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetDnsZoneRecordsRequest generates requests for GetDnsZoneRecords +func NewGetDnsZoneRecordsRequest(server string, params *GetDnsZoneRecordsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_zones/:dns_zone/records") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.DnsZoneId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[id]", runtime.ParamLocationQuery, *params.DnsZoneId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.DnsZoneName != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "dns_zone[name]", runtime.ParamLocationQuery, *params.DnsZoneName); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostDnsZoneRecordsRequest calls the generic PostDnsZoneRecords builder with application/json body +func NewPostDnsZoneRecordsRequest(server string, body PostDnsZoneRecordsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostDnsZoneRecordsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostDnsZoneRecordsRequestWithBody generates requests for PostDnsZoneRecords with any type of body +func NewPostDnsZoneRecordsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_zones/:dns_zone/records") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostDnsZoneVerifyRequest calls the generic PostDnsZoneVerify builder with application/json body +func NewPostDnsZoneVerifyRequest(server string, body PostDnsZoneVerifyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostDnsZoneVerifyRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostDnsZoneVerifyRequestWithBody generates requests for PostDnsZoneVerify with any type of body +func NewPostDnsZoneVerifyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/dns_zones/:dns_zone/verify") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteFileStorageVolumeRequest calls the generic DeleteFileStorageVolume builder with application/json body +func NewDeleteFileStorageVolumeRequest(server string, body DeleteFileStorageVolumeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteFileStorageVolumeRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteFileStorageVolumeRequestWithBody generates requests for DeleteFileStorageVolume with any type of body +func NewDeleteFileStorageVolumeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/file_storage_volumes/:file_storage_volume") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetFileStorageVolumeRequest generates requests for GetFileStorageVolume +func NewGetFileStorageVolumeRequest(server string, params *GetFileStorageVolumeParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/file_storage_volumes/:file_storage_volume") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.FileStorageVolumeId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "file_storage_volume[id]", runtime.ParamLocationQuery, *params.FileStorageVolumeId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchFileStorageVolumeRequest calls the generic PatchFileStorageVolume builder with application/json body +func NewPatchFileStorageVolumeRequest(server string, body PatchFileStorageVolumeJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchFileStorageVolumeRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchFileStorageVolumeRequestWithBody generates requests for PatchFileStorageVolume with any type of body +func NewPatchFileStorageVolumeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/file_storage_volumes/:file_storage_volume") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetGpuTypesRequest generates requests for GetGpuTypes +func NewGetGpuTypesRequest(server string, params *GetGpuTypesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gpu_types") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetGpuTypeRequest generates requests for GetGpuType +func NewGetGpuTypeRequest(server string, params *GetGpuTypeParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/gpu_types/:gpu_type") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.GpuTypeId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gpu_type[id]", runtime.ParamLocationQuery, *params.GpuTypeId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.GpuTypePermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "gpu_type[permalink]", runtime.ParamLocationQuery, *params.GpuTypePermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostInvalidateLinkedWebSessionRequest calls the generic PostInvalidateLinkedWebSession builder with application/json body +func NewPostInvalidateLinkedWebSessionRequest(server string, body PostInvalidateLinkedWebSessionJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostInvalidateLinkedWebSessionRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostInvalidateLinkedWebSessionRequestWithBody generates requests for PostInvalidateLinkedWebSession with any type of body +func NewPostInvalidateLinkedWebSessionRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/invalidate_linked_web_session") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteIpAddressRequest calls the generic DeleteIpAddress builder with application/json body +func NewDeleteIpAddressRequest(server string, body DeleteIpAddressJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteIpAddressRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteIpAddressRequestWithBody generates requests for DeleteIpAddress with any type of body +func NewDeleteIpAddressRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ip_addresses/:ip_address") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetIpAddressRequest generates requests for GetIpAddress +func NewGetIpAddressRequest(server string, params *GetIpAddressParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ip_addresses/:ip_address") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.IpAddressId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ip_address[id]", runtime.ParamLocationQuery, *params.IpAddressId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IpAddressAddress != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "ip_address[address]", runtime.ParamLocationQuery, *params.IpAddressAddress); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchIpAddressRequest calls the generic PatchIpAddress builder with application/json body +func NewPatchIpAddressRequest(server string, body PatchIpAddressJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchIpAddressRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchIpAddressRequestWithBody generates requests for PatchIpAddress with any type of body +func NewPatchIpAddressRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ip_addresses/:ip_address") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostIpAddressUnallocateRequest calls the generic PostIpAddressUnallocate builder with application/json body +func NewPostIpAddressUnallocateRequest(server string, body PostIpAddressUnallocateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostIpAddressUnallocateRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostIpAddressUnallocateRequestWithBody generates requests for PostIpAddressUnallocate with any type of body +func NewPostIpAddressUnallocateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ip_addresses/:ip_address/unallocate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteLoadBalancerRequest calls the generic DeleteLoadBalancer builder with application/json body +func NewDeleteLoadBalancerRequest(server string, body DeleteLoadBalancerJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteLoadBalancerRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteLoadBalancerRequestWithBody generates requests for DeleteLoadBalancer with any type of body +func NewDeleteLoadBalancerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/:load_balancer") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetLoadBalancerRequest generates requests for GetLoadBalancer +func NewGetLoadBalancerRequest(server string, params *GetLoadBalancerParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/:load_balancer") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.LoadBalancerId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[id]", runtime.ParamLocationQuery, *params.LoadBalancerId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.LoadBalancerApiReference != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[api_reference]", runtime.ParamLocationQuery, *params.LoadBalancerApiReference); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchLoadBalancerRequest calls the generic PatchLoadBalancer builder with application/json body +func NewPatchLoadBalancerRequest(server string, body PatchLoadBalancerJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchLoadBalancerRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchLoadBalancerRequestWithBody generates requests for PatchLoadBalancer with any type of body +func NewPatchLoadBalancerRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/:load_balancer") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetLoadBalancerRulesRequest generates requests for GetLoadBalancerRules +func NewGetLoadBalancerRulesRequest(server string, params *GetLoadBalancerRulesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/:load_balancer/rules") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.LoadBalancerId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[id]", runtime.ParamLocationQuery, *params.LoadBalancerId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.LoadBalancerApiReference != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer[api_reference]", runtime.ParamLocationQuery, *params.LoadBalancerApiReference); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostLoadBalancerRulesRequest calls the generic PostLoadBalancerRules builder with application/json body +func NewPostLoadBalancerRulesRequest(server string, body PostLoadBalancerRulesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostLoadBalancerRulesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostLoadBalancerRulesRequestWithBody generates requests for PostLoadBalancerRules with any type of body +func NewPostLoadBalancerRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/:load_balancer/rules") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteLoadBalancersRulesLoadBalancerRuleRequest calls the generic DeleteLoadBalancersRulesLoadBalancerRule builder with application/json body +func NewDeleteLoadBalancersRulesLoadBalancerRuleRequest(server string, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody generates requests for DeleteLoadBalancersRulesLoadBalancerRule with any type of body +func NewDeleteLoadBalancersRulesLoadBalancerRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/rules/:load_balancer_rule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetLoadBalancersRulesLoadBalancerRuleRequest generates requests for GetLoadBalancersRulesLoadBalancerRule +func NewGetLoadBalancersRulesLoadBalancerRuleRequest(server string, params *GetLoadBalancersRulesLoadBalancerRuleParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/rules/:load_balancer_rule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.LoadBalancerRuleId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "load_balancer_rule[id]", runtime.ParamLocationQuery, *params.LoadBalancerRuleId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchLoadBalancersRulesLoadBalancerRuleRequest calls the generic PatchLoadBalancersRulesLoadBalancerRule builder with application/json body +func NewPatchLoadBalancersRulesLoadBalancerRuleRequest(server string, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody generates requests for PatchLoadBalancersRulesLoadBalancerRule with any type of body +func NewPatchLoadBalancersRulesLoadBalancerRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/load_balancers/rules/:load_balancer_rule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetNetworkRequest generates requests for GetNetwork +func NewGetNetworkRequest(server string, params *GetNetworkParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/networks/:network") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[id]", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkPermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[permalink]", runtime.ParamLocationQuery, *params.NetworkPermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOperatingSystemsRequest generates requests for GetOperatingSystems +func NewGetOperatingSystemsRequest(server string, params *GetOperatingSystemsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/operating_systems") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOperatingSystemRequest generates requests for GetOperatingSystem +func NewGetOperatingSystemRequest(server string, params *GetOperatingSystemParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/operating_systems/:operating_system") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OperatingSystemId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "operating_system[id]", runtime.ParamLocationQuery, *params.OperatingSystemId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationsRequest generates requests for GetOrganizations +func NewGetOrganizationsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationRequest generates requests for GetOrganization +func NewGetOrganizationRequest(server string, params *GetOrganizationParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationAddressListsRequest generates requests for GetOrganizationAddressLists +func NewGetOrganizationAddressListsRequest(server string, params *GetOrganizationAddressListsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/address_lists") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationAddressListsRequest calls the generic PostOrganizationAddressLists builder with application/json body +func NewPostOrganizationAddressListsRequest(server string, body PostOrganizationAddressListsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationAddressListsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationAddressListsRequestWithBody generates requests for PostOrganizationAddressLists with any type of body +func NewPostOrganizationAddressListsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/address_lists") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationAvailableNetworksRequest generates requests for GetOrganizationAvailableNetworks +func NewGetOrganizationAvailableNetworksRequest(server string, params *GetOrganizationAvailableNetworksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/available_networks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationCertificatesRequest generates requests for GetOrganizationCertificates +func NewGetOrganizationCertificatesRequest(server string, params *GetOrganizationCertificatesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/certificates") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationDiskBackupPoliciesRequest generates requests for GetOrganizationDiskBackupPolicies +func NewGetOrganizationDiskBackupPoliciesRequest(server string, params *GetOrganizationDiskBackupPoliciesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/disk_backup_policies") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationDiskTemplatesRequest generates requests for GetOrganizationDiskTemplates +func NewGetOrganizationDiskTemplatesRequest(server string, params *GetOrganizationDiskTemplatesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/disk_templates") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeUniversal != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_universal", runtime.ParamLocationQuery, *params.IncludeUniversal); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OperatingSystemId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "operating_system[id]", runtime.ParamLocationQuery, *params.OperatingSystemId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationDisksRequest generates requests for GetOrganizationDisks +func NewGetOrganizationDisksRequest(server string, params *GetOrganizationDisksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/disks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationDnsZonesRequest generates requests for GetOrganizationDnsZones +func NewGetOrganizationDnsZonesRequest(server string, params *GetOrganizationDnsZonesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/dns_zones") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationDnsZonesRequest calls the generic PostOrganizationDnsZones builder with application/json body +func NewPostOrganizationDnsZonesRequest(server string, body PostOrganizationDnsZonesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationDnsZonesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationDnsZonesRequestWithBody generates requests for PostOrganizationDnsZones with any type of body +func NewPostOrganizationDnsZonesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/dns_zones") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationDnsZonesNameserversRequest generates requests for GetOrganizationDnsZonesNameservers +func NewGetOrganizationDnsZonesNameserversRequest(server string, params *GetOrganizationDnsZonesNameserversParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/dns_zones/nameservers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationFileStorageVolumesRequest generates requests for GetOrganizationFileStorageVolumes +func NewGetOrganizationFileStorageVolumesRequest(server string, params *GetOrganizationFileStorageVolumesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/file_storage_volumes") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationFileStorageVolumesRequest calls the generic PostOrganizationFileStorageVolumes builder with application/json body +func NewPostOrganizationFileStorageVolumesRequest(server string, body PostOrganizationFileStorageVolumesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationFileStorageVolumesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationFileStorageVolumesRequestWithBody generates requests for PostOrganizationFileStorageVolumes with any type of body +func NewPostOrganizationFileStorageVolumesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/file_storage_volumes") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationIpAddressesRequest generates requests for GetOrganizationIpAddresses +func NewGetOrganizationIpAddressesRequest(server string, params *GetOrganizationIpAddressesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/ip_addresses") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Allocated != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "allocated", runtime.ParamLocationQuery, *params.Allocated); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationIpAddressesRequest calls the generic PostOrganizationIpAddresses builder with application/json body +func NewPostOrganizationIpAddressesRequest(server string, body PostOrganizationIpAddressesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationIpAddressesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationIpAddressesRequestWithBody generates requests for PostOrganizationIpAddresses with any type of body +func NewPostOrganizationIpAddressesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/ip_addresses") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationLoadBalancersRequest generates requests for GetOrganizationLoadBalancers +func NewGetOrganizationLoadBalancersRequest(server string, params *GetOrganizationLoadBalancersParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/load_balancers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationLoadBalancersRequest calls the generic PostOrganizationLoadBalancers builder with application/json body +func NewPostOrganizationLoadBalancersRequest(server string, body PostOrganizationLoadBalancersJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationLoadBalancersRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationLoadBalancersRequestWithBody generates requests for PostOrganizationLoadBalancers with any type of body +func NewPostOrganizationLoadBalancersRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/load_balancers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationManagedRequest generates requests for GetOrganizationManaged +func NewGetOrganizationManagedRequest(server string, params *GetOrganizationManagedParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/managed") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationManagedRequest calls the generic PostOrganizationManaged builder with application/json body +func NewPostOrganizationManagedRequest(server string, body PostOrganizationManagedJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationManagedRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationManagedRequestWithBody generates requests for PostOrganizationManaged with any type of body +func NewPostOrganizationManagedRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/managed") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationNetworkSpeedProfilesRequest generates requests for GetOrganizationNetworkSpeedProfiles +func NewGetOrganizationNetworkSpeedProfilesRequest(server string, params *GetOrganizationNetworkSpeedProfilesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/network_speed_profiles") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationPolicyLimitsRequest generates requests for GetOrganizationPolicyLimits +func NewGetOrganizationPolicyLimitsRequest(server string, params *GetOrganizationPolicyLimitsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/policy_limits") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationSecurityGroupsRequest generates requests for GetOrganizationSecurityGroups +func NewGetOrganizationSecurityGroupsRequest(server string, params *GetOrganizationSecurityGroupsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/security_groups") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationSecurityGroupsRequest calls the generic PostOrganizationSecurityGroups builder with application/json body +func NewPostOrganizationSecurityGroupsRequest(server string, body PostOrganizationSecurityGroupsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationSecurityGroupsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationSecurityGroupsRequestWithBody generates requests for PostOrganizationSecurityGroups with any type of body +func NewPostOrganizationSecurityGroupsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/security_groups") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationSshKeysRequest generates requests for GetOrganizationSshKeys +func NewGetOrganizationSshKeysRequest(server string, params *GetOrganizationSshKeysParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/ssh_keys") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationSshKeysRequest calls the generic PostOrganizationSshKeys builder with application/json body +func NewPostOrganizationSshKeysRequest(server string, body PostOrganizationSshKeysJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationSshKeysRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationSshKeysRequestWithBody generates requests for PostOrganizationSshKeys with any type of body +func NewPostOrganizationSshKeysRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/ssh_keys") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationTagsRequest generates requests for GetOrganizationTags +func NewGetOrganizationTagsRequest(server string, params *GetOrganizationTagsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/tags") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationTagsRequest calls the generic PostOrganizationTags builder with application/json body +func NewPostOrganizationTagsRequest(server string, body PostOrganizationTagsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationTagsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationTagsRequestWithBody generates requests for PostOrganizationTags with any type of body +func NewPostOrganizationTagsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/tags") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationTrashObjectsRequest generates requests for GetOrganizationTrashObjects +func NewGetOrganizationTrashObjectsRequest(server string, params *GetOrganizationTrashObjectsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/trash_objects") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationTrashObjectsPurgeAllRequest calls the generic PostOrganizationTrashObjectsPurgeAll builder with application/json body +func NewPostOrganizationTrashObjectsPurgeAllRequest(server string, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationTrashObjectsPurgeAllRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationTrashObjectsPurgeAllRequestWithBody generates requests for PostOrganizationTrashObjectsPurgeAll with any type of body +func NewPostOrganizationTrashObjectsPurgeAllRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/trash_objects/purge_all") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationUsersWithAccessRequest generates requests for GetOrganizationUsersWithAccess +func NewGetOrganizationUsersWithAccessRequest(server string, params *GetOrganizationUsersWithAccessParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/users_with_access") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetOrganizationVirtualMachineGroupsRequest generates requests for GetOrganizationVirtualMachineGroups +func NewGetOrganizationVirtualMachineGroupsRequest(server string, params *GetOrganizationVirtualMachineGroupsParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/virtual_machine_groups") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationVirtualMachineGroupsRequest calls the generic PostOrganizationVirtualMachineGroups builder with application/json body +func NewPostOrganizationVirtualMachineGroupsRequest(server string, body PostOrganizationVirtualMachineGroupsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationVirtualMachineGroupsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationVirtualMachineGroupsRequestWithBody generates requests for PostOrganizationVirtualMachineGroups with any type of body +func NewPostOrganizationVirtualMachineGroupsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/virtual_machine_groups") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetOrganizationVirtualMachinesRequest generates requests for GetOrganizationVirtualMachines +func NewGetOrganizationVirtualMachinesRequest(server string, params *GetOrganizationVirtualMachinesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/virtual_machines") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostOrganizationVirtualMachinesBuildRequest calls the generic PostOrganizationVirtualMachinesBuild builder with application/json body +func NewPostOrganizationVirtualMachinesBuildRequest(server string, body PostOrganizationVirtualMachinesBuildJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationVirtualMachinesBuildRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationVirtualMachinesBuildRequestWithBody generates requests for PostOrganizationVirtualMachinesBuild with any type of body +func NewPostOrganizationVirtualMachinesBuildRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/virtual_machines/build") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostOrganizationVirtualMachinesBuildFromSpecRequest calls the generic PostOrganizationVirtualMachinesBuildFromSpec builder with application/json body +func NewPostOrganizationVirtualMachinesBuildFromSpecRequest(server string, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody generates requests for PostOrganizationVirtualMachinesBuildFromSpec with any type of body +func NewPostOrganizationVirtualMachinesBuildFromSpecRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/organizations/:organization/virtual_machines/build_from_spec") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteSecurityGroupRequest calls the generic DeleteSecurityGroup builder with application/json body +func NewDeleteSecurityGroupRequest(server string, body DeleteSecurityGroupJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteSecurityGroupRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteSecurityGroupRequestWithBody generates requests for DeleteSecurityGroup with any type of body +func NewDeleteSecurityGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/:security_group") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSecurityGroupRequest generates requests for GetSecurityGroup +func NewGetSecurityGroupRequest(server string, params *GetSecurityGroupParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/:security_group") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.SecurityGroupId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "security_group[id]", runtime.ParamLocationQuery, *params.SecurityGroupId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchSecurityGroupRequest calls the generic PatchSecurityGroup builder with application/json body +func NewPatchSecurityGroupRequest(server string, body PatchSecurityGroupJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchSecurityGroupRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchSecurityGroupRequestWithBody generates requests for PatchSecurityGroup with any type of body +func NewPatchSecurityGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/:security_group") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSecurityGroupRulesRequest generates requests for GetSecurityGroupRules +func NewGetSecurityGroupRulesRequest(server string, params *GetSecurityGroupRulesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/:security_group/rules") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.SecurityGroupId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "security_group[id]", runtime.ParamLocationQuery, *params.SecurityGroupId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostSecurityGroupRulesRequest calls the generic PostSecurityGroupRules builder with application/json body +func NewPostSecurityGroupRulesRequest(server string, body PostSecurityGroupRulesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostSecurityGroupRulesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostSecurityGroupRulesRequestWithBody generates requests for PostSecurityGroupRules with any type of body +func NewPostSecurityGroupRulesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/:security_group/rules") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteSecurityGroupsRulesSecurityGroupRuleRequest calls the generic DeleteSecurityGroupsRulesSecurityGroupRule builder with application/json body +func NewDeleteSecurityGroupsRulesSecurityGroupRuleRequest(server string, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody generates requests for DeleteSecurityGroupsRulesSecurityGroupRule with any type of body +func NewDeleteSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/rules/:security_group_rule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetSecurityGroupsRulesSecurityGroupRuleRequest generates requests for GetSecurityGroupsRulesSecurityGroupRule +func NewGetSecurityGroupsRulesSecurityGroupRuleRequest(server string, params *GetSecurityGroupsRulesSecurityGroupRuleParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/rules/:security_group_rule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.SecurityGroupRuleId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "security_group_rule[id]", runtime.ParamLocationQuery, *params.SecurityGroupRuleId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchSecurityGroupsRulesSecurityGroupRuleRequest calls the generic PatchSecurityGroupsRulesSecurityGroupRule builder with application/json body +func NewPatchSecurityGroupsRulesSecurityGroupRuleRequest(server string, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody generates requests for PatchSecurityGroupsRulesSecurityGroupRule with any type of body +func NewPatchSecurityGroupsRulesSecurityGroupRuleRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/security_groups/rules/:security_group_rule") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteSshKeyRequest calls the generic DeleteSshKey builder with application/json body +func NewDeleteSshKeyRequest(server string, body DeleteSshKeyJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteSshKeyRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteSshKeyRequestWithBody generates requests for DeleteSshKey with any type of body +func NewDeleteSshKeyRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/ssh_keys/:ssh_key") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewDeleteTagRequest calls the generic DeleteTag builder with application/json body +func NewDeleteTagRequest(server string, body DeleteTagJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteTagRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteTagRequestWithBody generates requests for DeleteTag with any type of body +func NewDeleteTagRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/tags/:tag") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTagRequest generates requests for GetTag +func NewGetTagRequest(server string, params *GetTagParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/tags/:tag") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.TagId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "tag[id]", runtime.ParamLocationQuery, *params.TagId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchTagRequest calls the generic PatchTag builder with application/json body +func NewPatchTagRequest(server string, body PatchTagJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchTagRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchTagRequestWithBody generates requests for PatchTag with any type of body +func NewPatchTagRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/tags/:tag") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTaskRequest generates requests for GetTask +func NewGetTaskRequest(server string, params *GetTaskParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/tasks/:task") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.TaskId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "task[id]", runtime.ParamLocationQuery, *params.TaskId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteTrashObjectRequest calls the generic DeleteTrashObject builder with application/json body +func NewDeleteTrashObjectRequest(server string, body DeleteTrashObjectJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteTrashObjectRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteTrashObjectRequestWithBody generates requests for DeleteTrashObject with any type of body +func NewDeleteTrashObjectRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/trash_objects/:trash_object") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetTrashObjectRequest generates requests for GetTrashObject +func NewGetTrashObjectRequest(server string, params *GetTrashObjectParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/trash_objects/:trash_object") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.TrashObjectId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "trash_object[id]", runtime.ParamLocationQuery, *params.TrashObjectId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.TrashObjectObjectId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "trash_object[object_id]", runtime.ParamLocationQuery, *params.TrashObjectObjectId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostTrashObjectRestoreRequest calls the generic PostTrashObjectRestore builder with application/json body +func NewPostTrashObjectRestoreRequest(server string, body PostTrashObjectRestoreJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostTrashObjectRestoreRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostTrashObjectRestoreRequestWithBody generates requests for PostTrashObjectRestore with any type of body +func NewPostTrashObjectRestoreRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/trash_objects/:trash_object/restore") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetUsersCurrentRequest generates requests for GetUsersCurrent +func NewGetUsersCurrentRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/users/current") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetVirtualMachineAuthorizedKeysRequest generates requests for GetVirtualMachineAuthorizedKeys +func NewGetVirtualMachineAuthorizedKeysRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine/authorized_keys") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteVirtualMachineGroupRequest calls the generic DeleteVirtualMachineGroup builder with application/json body +func NewDeleteVirtualMachineGroupRequest(server string, body DeleteVirtualMachineGroupJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteVirtualMachineGroupRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteVirtualMachineGroupRequestWithBody generates requests for DeleteVirtualMachineGroup with any type of body +func NewDeleteVirtualMachineGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_groups/:virtual_machine_group") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachineGroupRequest generates requests for GetVirtualMachineGroup +func NewGetVirtualMachineGroupRequest(server string, params *GetVirtualMachineGroupParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_groups/:virtual_machine_group") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineGroupId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_group[id]", runtime.ParamLocationQuery, *params.VirtualMachineGroupId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchVirtualMachineGroupRequest calls the generic PatchVirtualMachineGroup builder with application/json body +func NewPatchVirtualMachineGroupRequest(server string, body PatchVirtualMachineGroupJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchVirtualMachineGroupRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchVirtualMachineGroupRequestWithBody generates requests for PatchVirtualMachineGroup with any type of body +func NewPatchVirtualMachineGroupRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_groups/:virtual_machine_group") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVMNIVMNIRequest generates requests for GetVMNIVMNI +func NewGetVMNIVMNIRequest(server string, params *GetVMNIVMNIParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineNetworkInterfaceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_network_interface[id]", runtime.ParamLocationQuery, *params.VirtualMachineNetworkInterfaceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostVirtualMachineNetworkInterfaceAllocateIpRequest calls the generic PostVirtualMachineNetworkInterfaceAllocateIp builder with application/json body +func NewPostVirtualMachineNetworkInterfaceAllocateIpRequest(server string, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody generates requests for PostVirtualMachineNetworkInterfaceAllocateIp with any type of body +func NewPostVirtualMachineNetworkInterfaceAllocateIpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/allocate_ip") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequest calls the generic PostVirtualMachineNetworkInterfaceAllocateNewIp builder with application/json body +func NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequest(server string, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody generates requests for PostVirtualMachineNetworkInterfaceAllocateNewIp with any type of body +func NewPostVirtualMachineNetworkInterfaceAllocateNewIpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/allocate_new_ip") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionRequest generates requests for GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion +func NewGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionRequest(server string, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/available_ips/:address_version") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineNetworkInterfaceId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_network_interface[id]", runtime.ParamLocationQuery, *params.VirtualMachineNetworkInterfaceId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "address_version", runtime.ParamLocationQuery, params.AddressVersion); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequest calls the generic PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile builder with application/json body +func NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequest(server string, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody generates requests for PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile with any type of body +func NewPatchVirtualMachineNetworkInterfaceUpdateSpeedProfileRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_network_interfaces/:virtual_machine_network_interface/update_speed_profile") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachinePackagesRequest generates requests for GetVirtualMachinePackages +func NewGetVirtualMachinePackagesRequest(server string, params *GetVirtualMachinePackagesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_packages") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.OrganizationId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[id]", runtime.ParamLocationQuery, *params.OrganizationId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.OrganizationSubDomain != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "organization[sub_domain]", runtime.ParamLocationQuery, *params.OrganizationSubDomain); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetVirtualMachinePackageRequest generates requests for GetVirtualMachinePackage +func NewGetVirtualMachinePackageRequest(server string, params *GetVirtualMachinePackageParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_packages/:virtual_machine_package") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachinePackageId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_package[id]", runtime.ParamLocationQuery, *params.VirtualMachinePackageId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VirtualMachinePackagePermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_package[permalink]", runtime.ParamLocationQuery, *params.VirtualMachinePackagePermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewDeleteVirtualMachineRequest calls the generic DeleteVirtualMachine builder with application/json body +func NewDeleteVirtualMachineRequest(server string, body DeleteVirtualMachineJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewDeleteVirtualMachineRequestWithBody(server, "application/json", bodyReader) +} + +// NewDeleteVirtualMachineRequestWithBody generates requests for DeleteVirtualMachine with any type of body +func NewDeleteVirtualMachineRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("DELETE", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachineRequest generates requests for GetVirtualMachine +func NewGetVirtualMachineRequest(server string, params *GetVirtualMachineParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VirtualMachineFqdn != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPatchVirtualMachineRequest calls the generic PatchVirtualMachine builder with application/json body +func NewPatchVirtualMachineRequest(server string, body PatchVirtualMachineJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPatchVirtualMachineRequestWithBody(server, "application/json", bodyReader) +} + +// NewPatchVirtualMachineRequestWithBody generates requests for PatchVirtualMachine with any type of body +func NewPatchVirtualMachineRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PATCH", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostVirtualMachineAllocateIpRequest calls the generic PostVirtualMachineAllocateIp builder with application/json body +func NewPostVirtualMachineAllocateIpRequest(server string, body PostVirtualMachineAllocateIpJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineAllocateIpRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineAllocateIpRequestWithBody generates requests for PostVirtualMachineAllocateIp with any type of body +func NewPostVirtualMachineAllocateIpRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/allocate_ip") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostVirtualMachineConsoleSessionsRequest calls the generic PostVirtualMachineConsoleSessions builder with application/json body +func NewPostVirtualMachineConsoleSessionsRequest(server string, body PostVirtualMachineConsoleSessionsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineConsoleSessionsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineConsoleSessionsRequestWithBody generates requests for PostVirtualMachineConsoleSessions with any type of body +func NewPostVirtualMachineConsoleSessionsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/console_sessions") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachineDiskBackupPoliciesRequest generates requests for GetVirtualMachineDiskBackupPolicies +func NewGetVirtualMachineDiskBackupPoliciesRequest(server string, params *GetVirtualMachineDiskBackupPoliciesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/disk_backup_policies") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VirtualMachineFqdn != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.IncludeDisks != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "include_disks", runtime.ParamLocationQuery, *params.IncludeDisks); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostVirtualMachineDiskBackupPoliciesRequest calls the generic PostVirtualMachineDiskBackupPolicies builder with application/json body +func NewPostVirtualMachineDiskBackupPoliciesRequest(server string, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineDiskBackupPoliciesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineDiskBackupPoliciesRequestWithBody generates requests for PostVirtualMachineDiskBackupPolicies with any type of body +func NewPostVirtualMachineDiskBackupPoliciesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/disk_backup_policies") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachineDisksRequest generates requests for GetVirtualMachineDisks +func NewGetVirtualMachineDisksRequest(server string, params *GetVirtualMachineDisksParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/disks") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VirtualMachineFqdn != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutVirtualMachineFlexibleResourcesRequest calls the generic PutVirtualMachineFlexibleResources builder with application/json body +func NewPutVirtualMachineFlexibleResourcesRequest(server string, body PutVirtualMachineFlexibleResourcesJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutVirtualMachineFlexibleResourcesRequestWithBody(server, "application/json", bodyReader) +} + +// NewPutVirtualMachineFlexibleResourcesRequestWithBody generates requests for PutVirtualMachineFlexibleResources with any type of body +func NewPutVirtualMachineFlexibleResourcesRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/flexible_resources") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachineNetworkInterfacesRequest generates requests for GetVirtualMachineNetworkInterfaces +func NewGetVirtualMachineNetworkInterfacesRequest(server string, params *GetVirtualMachineNetworkInterfacesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/network_interfaces") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VirtualMachineFqdn != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetVirtualMachineNetworkInterfaceRequest generates requests for GetVirtualMachineNetworkInterface +func NewGetVirtualMachineNetworkInterfaceRequest(server string, params *GetVirtualMachineNetworkInterfaceParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/networks/:network/interface") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[id]", runtime.ParamLocationQuery, *params.VirtualMachineId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.VirtualMachineFqdn != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine[fqdn]", runtime.ParamLocationQuery, *params.VirtualMachineFqdn); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[id]", runtime.ParamLocationQuery, *params.NetworkId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.NetworkPermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "network[permalink]", runtime.ParamLocationQuery, *params.NetworkPermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPutVirtualMachinePackageRequest calls the generic PutVirtualMachinePackage builder with application/json body +func NewPutVirtualMachinePackageRequest(server string, body PutVirtualMachinePackageJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPutVirtualMachinePackageRequestWithBody(server, "application/json", bodyReader) +} + +// NewPutVirtualMachinePackageRequestWithBody generates requests for PutVirtualMachinePackage with any type of body +func NewPutVirtualMachinePackageRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/package") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("PUT", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostVirtualMachineResetRequest calls the generic PostVirtualMachineReset builder with application/json body +func NewPostVirtualMachineResetRequest(server string, body PostVirtualMachineResetJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineResetRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineResetRequestWithBody generates requests for PostVirtualMachineReset with any type of body +func NewPostVirtualMachineResetRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/reset") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostVirtualMachineShutdownRequest calls the generic PostVirtualMachineShutdown builder with application/json body +func NewPostVirtualMachineShutdownRequest(server string, body PostVirtualMachineShutdownJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineShutdownRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineShutdownRequestWithBody generates requests for PostVirtualMachineShutdown with any type of body +func NewPostVirtualMachineShutdownRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/shutdown") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostVirtualMachineStartRequest calls the generic PostVirtualMachineStart builder with application/json body +func NewPostVirtualMachineStartRequest(server string, body PostVirtualMachineStartJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineStartRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineStartRequestWithBody generates requests for PostVirtualMachineStart with any type of body +func NewPostVirtualMachineStartRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/start") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewPostVirtualMachineStopRequest calls the generic PostVirtualMachineStop builder with application/json body +func NewPostVirtualMachineStopRequest(server string, body PostVirtualMachineStopJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostVirtualMachineStopRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostVirtualMachineStopRequestWithBody generates requests for PostVirtualMachineStop with any type of body +func NewPostVirtualMachineStopRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/:virtual_machine/stop") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetVirtualMachinesBuildsVirtualMachineBuildRequest generates requests for GetVirtualMachinesBuildsVirtualMachineBuild +func NewGetVirtualMachinesBuildsVirtualMachineBuildRequest(server string, params *GetVirtualMachinesBuildsVirtualMachineBuildParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machines/builds/:virtual_machine_build") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.VirtualMachineBuildId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "virtual_machine_build[id]", runtime.ParamLocationQuery, *params.VirtualMachineBuildId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetZonesRequest generates requests for GetZones +func NewGetZonesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/zones") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetZoneRequest generates requests for GetZone +func NewGetZoneRequest(server string, params *GetZoneParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/zones/:zone") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.ZoneId != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "zone[id]", runtime.ParamLocationQuery, *params.ZoneId); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.ZonePermalink != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "zone[permalink]", runtime.ParamLocationQuery, *params.ZonePermalink); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} // ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, token string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, token, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // DeleteAddressListEntryWithBodyWithResponse request with any body + DeleteAddressListEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteAddressListEntryResponse, error) + + DeleteAddressListEntryWithResponse(ctx context.Context, body DeleteAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteAddressListEntryResponse, error) + + // GetAddressListEntryWithResponse request + GetAddressListEntryWithResponse(ctx context.Context, params *GetAddressListEntryParams, reqEditors ...RequestEditorFn) (*GetAddressListEntryResponse, error) + + // PatchAddressListEntryWithBodyWithResponse request with any body + PatchAddressListEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchAddressListEntryResponse, error) + + PatchAddressListEntryWithResponse(ctx context.Context, body PatchAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchAddressListEntryResponse, error) + + // GetAddressListsWithResponse request + GetAddressListsWithResponse(ctx context.Context, params *GetAddressListsParams, reqEditors ...RequestEditorFn) (*GetAddressListsResponse, error) + + // DeleteAddressListWithBodyWithResponse request with any body + DeleteAddressListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteAddressListResponse, error) + + DeleteAddressListWithResponse(ctx context.Context, body DeleteAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteAddressListResponse, error) + + // GetAddressListWithResponse request + GetAddressListWithResponse(ctx context.Context, params *GetAddressListParams, reqEditors ...RequestEditorFn) (*GetAddressListResponse, error) + + // PatchAddressListWithBodyWithResponse request with any body + PatchAddressListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchAddressListResponse, error) + + PatchAddressListWithResponse(ctx context.Context, body PatchAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchAddressListResponse, error) + + // GetAddressListEntriesWithResponse request + GetAddressListEntriesWithResponse(ctx context.Context, params *GetAddressListEntriesParams, reqEditors ...RequestEditorFn) (*GetAddressListEntriesResponse, error) + + // PostAddressListEntriesWithBodyWithResponse request with any body + PostAddressListEntriesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAddressListEntriesResponse, error) + + PostAddressListEntriesWithResponse(ctx context.Context, body PostAddressListEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAddressListEntriesResponse, error) + + // GetCertificateWithResponse request + GetCertificateWithResponse(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*GetCertificateResponse, error) + + // GetCountriesWithResponse request + GetCountriesWithResponse(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*GetCountriesResponse, error) + + // GetCountryWithResponse request + GetCountryWithResponse(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*GetCountryResponse, error) + + // GetCountryCountryStatesWithResponse request + GetCountryCountryStatesWithResponse(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*GetCountryCountryStatesResponse, error) + + // GetCountryStateWithResponse request + GetCountryStateWithResponse(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*GetCountryStateResponse, error) + + // GetCurrenciesWithResponse request + GetCurrenciesWithResponse(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*GetCurrenciesResponse, error) + + // GetCurrencyWithResponse request + GetCurrencyWithResponse(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*GetCurrencyResponse, error) + + // GetDataCentersWithResponse request + GetDataCentersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDataCentersResponse, error) + + // GetDataCenterWithResponse request + GetDataCenterWithResponse(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*GetDataCenterResponse, error) + + // GetDataCenterDefaultNetworkWithResponse request + GetDataCenterDefaultNetworkWithResponse(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*GetDataCenterDefaultNetworkResponse, error) + + // GetDataCenterGpuTypesWithResponse request + GetDataCenterGpuTypesWithResponse(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*GetDataCenterGpuTypesResponse, error) + + // DeleteDiskBackupPolicyWithBodyWithResponse request with any body + DeleteDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) + + DeleteDiskBackupPolicyWithResponse(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) + + // GetDiskBackupPolicyWithResponse request + GetDiskBackupPolicyWithResponse(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*GetDiskBackupPolicyResponse, error) + + // PatchDiskBackupPolicyWithBodyWithResponse request with any body + PatchDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) + + PatchDiskBackupPolicyWithResponse(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) + + // DeleteDiskBackupPolicyScheduleWithBodyWithResponse request with any body + DeleteDiskBackupPolicyScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) + + DeleteDiskBackupPolicyScheduleWithResponse(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) + + // GetDiskTemplateVersionWithResponse request + GetDiskTemplateVersionWithResponse(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionResponse, error) + + // GetDiskTemplateVersionSpecWithResponse request + GetDiskTemplateVersionSpecWithResponse(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionSpecResponse, error) + + // GetDiskTemplateWithResponse request + GetDiskTemplateWithResponse(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateResponse, error) + + // GetDiskTemplateVersionsWithResponse request + GetDiskTemplateVersionsWithResponse(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionsResponse, error) + + // GetDiskWithResponse request + GetDiskWithResponse(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*GetDiskResponse, error) + + // GetDiskDiskBackupPoliciesWithResponse request + GetDiskDiskBackupPoliciesWithResponse(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetDiskDiskBackupPoliciesResponse, error) + + // PostDiskDiskBackupPoliciesWithBodyWithResponse request with any body + PostDiskDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) + + PostDiskDiskBackupPoliciesWithResponse(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) + + // DeleteDnsRecordWithBodyWithResponse request with any body + DeleteDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) + + DeleteDnsRecordWithResponse(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) + + // GetDnsRecordWithResponse request + GetDnsRecordWithResponse(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*GetDnsRecordResponse, error) + + // PatchDnsRecordWithBodyWithResponse request with any body + PatchDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) + + PatchDnsRecordWithResponse(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) + + // DeleteDnsZoneWithBodyWithResponse request with any body + DeleteDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) + + DeleteDnsZoneWithResponse(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) + + // GetDnsZoneWithResponse request + GetDnsZoneWithResponse(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*GetDnsZoneResponse, error) + + // PatchDnsZoneWithBodyWithResponse request with any body + PatchDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) + + PatchDnsZoneWithResponse(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) + + // GetDnsZoneRecordsWithResponse request + GetDnsZoneRecordsWithResponse(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*GetDnsZoneRecordsResponse, error) + + // PostDnsZoneRecordsWithBodyWithResponse request with any body + PostDnsZoneRecordsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) + + PostDnsZoneRecordsWithResponse(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) + + // PostDnsZoneVerifyWithBodyWithResponse request with any body + PostDnsZoneVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) + + PostDnsZoneVerifyWithResponse(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) + + // DeleteFileStorageVolumeWithBodyWithResponse request with any body + DeleteFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) + + DeleteFileStorageVolumeWithResponse(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) + + // GetFileStorageVolumeWithResponse request + GetFileStorageVolumeWithResponse(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*GetFileStorageVolumeResponse, error) + + // PatchFileStorageVolumeWithBodyWithResponse request with any body + PatchFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) + + PatchFileStorageVolumeWithResponse(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) + + // GetGpuTypesWithResponse request + GetGpuTypesWithResponse(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*GetGpuTypesResponse, error) + + // GetGpuTypeWithResponse request + GetGpuTypeWithResponse(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*GetGpuTypeResponse, error) + + // PostInvalidateLinkedWebSessionWithBodyWithResponse request with any body + PostInvalidateLinkedWebSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) + + PostInvalidateLinkedWebSessionWithResponse(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) + + // DeleteIpAddressWithBodyWithResponse request with any body + DeleteIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) + + DeleteIpAddressWithResponse(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) + + // GetIpAddressWithResponse request + GetIpAddressWithResponse(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*GetIpAddressResponse, error) + + // PatchIpAddressWithBodyWithResponse request with any body + PatchIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) + + PatchIpAddressWithResponse(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) + + // PostIpAddressUnallocateWithBodyWithResponse request with any body + PostIpAddressUnallocateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) + + PostIpAddressUnallocateWithResponse(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) + + // DeleteLoadBalancerWithBodyWithResponse request with any body + DeleteLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) + + DeleteLoadBalancerWithResponse(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) + + // GetLoadBalancerWithResponse request + GetLoadBalancerWithResponse(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerResponse, error) + + // PatchLoadBalancerWithBodyWithResponse request with any body + PatchLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) + + PatchLoadBalancerWithResponse(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) + + // GetLoadBalancerRulesWithResponse request + GetLoadBalancerRulesWithResponse(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerRulesResponse, error) + + // PostLoadBalancerRulesWithBodyWithResponse request with any body + PostLoadBalancerRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) + + PostLoadBalancerRulesWithResponse(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) + + // DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with any body + DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) + + DeleteLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) + + // GetLoadBalancersRulesLoadBalancerRuleWithResponse request + GetLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*GetLoadBalancersRulesLoadBalancerRuleResponse, error) + + // PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with any body + PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) + + PatchLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) + + // GetNetworkWithResponse request + GetNetworkWithResponse(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*GetNetworkResponse, error) + + // GetOperatingSystemsWithResponse request + GetOperatingSystemsWithResponse(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemsResponse, error) + + // GetOperatingSystemWithResponse request + GetOperatingSystemWithResponse(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemResponse, error) + + // GetOrganizationsWithResponse request + GetOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) + + // GetOrganizationWithResponse request + GetOrganizationWithResponse(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error) + + // GetOrganizationAddressListsWithResponse request + GetOrganizationAddressListsWithResponse(ctx context.Context, params *GetOrganizationAddressListsParams, reqEditors ...RequestEditorFn) (*GetOrganizationAddressListsResponse, error) + + // PostOrganizationAddressListsWithBodyWithResponse request with any body + PostOrganizationAddressListsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationAddressListsResponse, error) + + PostOrganizationAddressListsWithResponse(ctx context.Context, body PostOrganizationAddressListsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationAddressListsResponse, error) + + // GetOrganizationAvailableNetworksWithResponse request + GetOrganizationAvailableNetworksWithResponse(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*GetOrganizationAvailableNetworksResponse, error) + + // GetOrganizationCertificatesWithResponse request + GetOrganizationCertificatesWithResponse(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationCertificatesResponse, error) + + // GetOrganizationDiskBackupPoliciesWithResponse request + GetOrganizationDiskBackupPoliciesWithResponse(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskBackupPoliciesResponse, error) + + // GetOrganizationDiskTemplatesWithResponse request + GetOrganizationDiskTemplatesWithResponse(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskTemplatesResponse, error) + + // GetOrganizationDisksWithResponse request + GetOrganizationDisksWithResponse(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*GetOrganizationDisksResponse, error) + + // GetOrganizationDnsZonesWithResponse request + GetOrganizationDnsZonesWithResponse(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesResponse, error) + + // PostOrganizationDnsZonesWithBodyWithResponse request with any body + PostOrganizationDnsZonesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) + + PostOrganizationDnsZonesWithResponse(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) + + // GetOrganizationDnsZonesNameserversWithResponse request + GetOrganizationDnsZonesNameserversWithResponse(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesNameserversResponse, error) + + // GetOrganizationFileStorageVolumesWithResponse request + GetOrganizationFileStorageVolumesWithResponse(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*GetOrganizationFileStorageVolumesResponse, error) + + // PostOrganizationFileStorageVolumesWithBodyWithResponse request with any body + PostOrganizationFileStorageVolumesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) + + PostOrganizationFileStorageVolumesWithResponse(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) + + // GetOrganizationIpAddressesWithResponse request + GetOrganizationIpAddressesWithResponse(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*GetOrganizationIpAddressesResponse, error) + + // PostOrganizationIpAddressesWithBodyWithResponse request with any body + PostOrganizationIpAddressesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) + + PostOrganizationIpAddressesWithResponse(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) + + // GetOrganizationLoadBalancersWithResponse request + GetOrganizationLoadBalancersWithResponse(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*GetOrganizationLoadBalancersResponse, error) + + // PostOrganizationLoadBalancersWithBodyWithResponse request with any body + PostOrganizationLoadBalancersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) + + PostOrganizationLoadBalancersWithResponse(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) + + // GetOrganizationManagedWithResponse request + GetOrganizationManagedWithResponse(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*GetOrganizationManagedResponse, error) + + // PostOrganizationManagedWithBodyWithResponse request with any body + PostOrganizationManagedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) + + PostOrganizationManagedWithResponse(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) + + // GetOrganizationNetworkSpeedProfilesWithResponse request + GetOrganizationNetworkSpeedProfilesWithResponse(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*GetOrganizationNetworkSpeedProfilesResponse, error) + + // GetOrganizationPolicyLimitsWithResponse request + GetOrganizationPolicyLimitsWithResponse(ctx context.Context, params *GetOrganizationPolicyLimitsParams, reqEditors ...RequestEditorFn) (*GetOrganizationPolicyLimitsResponse, error) + + // GetOrganizationSecurityGroupsWithResponse request + GetOrganizationSecurityGroupsWithResponse(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationSecurityGroupsResponse, error) + + // PostOrganizationSecurityGroupsWithBodyWithResponse request with any body + PostOrganizationSecurityGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) + + PostOrganizationSecurityGroupsWithResponse(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) + + // GetOrganizationSshKeysWithResponse request + GetOrganizationSshKeysWithResponse(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*GetOrganizationSshKeysResponse, error) + + // PostOrganizationSshKeysWithBodyWithResponse request with any body + PostOrganizationSshKeysWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) + + PostOrganizationSshKeysWithResponse(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) + + // GetOrganizationTagsWithResponse request + GetOrganizationTagsWithResponse(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTagsResponse, error) + + // PostOrganizationTagsWithBodyWithResponse request with any body + PostOrganizationTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) + + PostOrganizationTagsWithResponse(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) + + // GetOrganizationTrashObjectsWithResponse request + GetOrganizationTrashObjectsWithResponse(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTrashObjectsResponse, error) + + // PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse request with any body + PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) + + PostOrganizationTrashObjectsPurgeAllWithResponse(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) + + // GetOrganizationUsersWithAccessWithResponse request + GetOrganizationUsersWithAccessWithResponse(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*GetOrganizationUsersWithAccessResponse, error) + + // GetOrganizationVirtualMachineGroupsWithResponse request + GetOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachineGroupsResponse, error) + + // PostOrganizationVirtualMachineGroupsWithBodyWithResponse request with any body + PostOrganizationVirtualMachineGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) + + PostOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) + + // GetOrganizationVirtualMachinesWithResponse request + GetOrganizationVirtualMachinesWithResponse(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachinesResponse, error) + + // PostOrganizationVirtualMachinesBuildWithBodyWithResponse request with any body + PostOrganizationVirtualMachinesBuildWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) + + PostOrganizationVirtualMachinesBuildWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) + + // PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse request with any body + PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) + + PostOrganizationVirtualMachinesBuildFromSpecWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) + + // DeleteSecurityGroupWithBodyWithResponse request with any body + DeleteSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) + + DeleteSecurityGroupWithResponse(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) + + // GetSecurityGroupWithResponse request + GetSecurityGroupWithResponse(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupResponse, error) + + // PatchSecurityGroupWithBodyWithResponse request with any body + PatchSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) + + PatchSecurityGroupWithResponse(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) + + // GetSecurityGroupRulesWithResponse request + GetSecurityGroupRulesWithResponse(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupRulesResponse, error) + + // PostSecurityGroupRulesWithBodyWithResponse request with any body + PostSecurityGroupRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) + + PostSecurityGroupRulesWithResponse(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) + + // DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with any body + DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) + + DeleteSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) + + // GetSecurityGroupsRulesSecurityGroupRuleWithResponse request + GetSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupsRulesSecurityGroupRuleResponse, error) + + // PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with any body + PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) + + PatchSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) + + // DeleteSshKeyWithBodyWithResponse request with any body + DeleteSshKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) + + DeleteSshKeyWithResponse(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) + + // DeleteTagWithBodyWithResponse request with any body + DeleteTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) + + DeleteTagWithResponse(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) + + // GetTagWithResponse request + GetTagWithResponse(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*GetTagResponse, error) + + // PatchTagWithBodyWithResponse request with any body + PatchTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) + + PatchTagWithResponse(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) + + // GetTaskWithResponse request + GetTaskWithResponse(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) + + // DeleteTrashObjectWithBodyWithResponse request with any body + DeleteTrashObjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) + + DeleteTrashObjectWithResponse(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) + + // GetTrashObjectWithResponse request + GetTrashObjectWithResponse(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*GetTrashObjectResponse, error) + + // PostTrashObjectRestoreWithBodyWithResponse request with any body + PostTrashObjectRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) + + PostTrashObjectRestoreWithResponse(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) + + // GetUsersCurrentWithResponse request + GetUsersCurrentWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsersCurrentResponse, error) + + // GetVirtualMachineAuthorizedKeysWithResponse request + GetVirtualMachineAuthorizedKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVirtualMachineAuthorizedKeysResponse, error) + + // DeleteVirtualMachineGroupWithBodyWithResponse request with any body + DeleteVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) + + DeleteVirtualMachineGroupWithResponse(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) + + // GetVirtualMachineGroupWithResponse request + GetVirtualMachineGroupWithResponse(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineGroupResponse, error) + + // PatchVirtualMachineGroupWithBodyWithResponse request with any body + PatchVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) + + PatchVirtualMachineGroupWithResponse(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) + + // GetVMNIVMNIWithResponse request + GetVMNIVMNIWithResponse(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*GetVMNIVMNIResponse, error) + + // PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse request with any body + PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) + + PostVirtualMachineNetworkInterfaceAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) + + // PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse request with any body + PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) + + PostVirtualMachineNetworkInterfaceAllocateNewIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) + + // GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse request + GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse, error) + + // PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse request with any body + PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) + + PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithResponse(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) + + // GetVirtualMachinePackagesWithResponse request + GetVirtualMachinePackagesWithResponse(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackagesResponse, error) + + // GetVirtualMachinePackageWithResponse request + GetVirtualMachinePackageWithResponse(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackageResponse, error) + + // DeleteVirtualMachineWithBodyWithResponse request with any body + DeleteVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) + + DeleteVirtualMachineWithResponse(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) + + // GetVirtualMachineWithResponse request + GetVirtualMachineWithResponse(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineResponse, error) + + // PatchVirtualMachineWithBodyWithResponse request with any body + PatchVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) + + PatchVirtualMachineWithResponse(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) + + // PostVirtualMachineAllocateIpWithBodyWithResponse request with any body + PostVirtualMachineAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) + + PostVirtualMachineAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) + + // PostVirtualMachineConsoleSessionsWithBodyWithResponse request with any body + PostVirtualMachineConsoleSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) + + PostVirtualMachineConsoleSessionsWithResponse(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) + + // GetVirtualMachineDiskBackupPoliciesWithResponse request + GetVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDiskBackupPoliciesResponse, error) + + // PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse request with any body + PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) + + PostVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) + + // GetVirtualMachineDisksWithResponse request + GetVirtualMachineDisksWithResponse(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDisksResponse, error) + + // PutVirtualMachineFlexibleResourcesWithBodyWithResponse request with any body + PutVirtualMachineFlexibleResourcesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) + + PutVirtualMachineFlexibleResourcesWithResponse(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) + + // GetVirtualMachineNetworkInterfacesWithResponse request + GetVirtualMachineNetworkInterfacesWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfacesResponse, error) + + // GetVirtualMachineNetworkInterfaceWithResponse request + GetVirtualMachineNetworkInterfaceWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceResponse, error) + + // PutVirtualMachinePackageWithBodyWithResponse request with any body + PutVirtualMachinePackageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) + + PutVirtualMachinePackageWithResponse(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) + + // PostVirtualMachineResetWithBodyWithResponse request with any body + PostVirtualMachineResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) + + PostVirtualMachineResetWithResponse(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) + + // PostVirtualMachineShutdownWithBodyWithResponse request with any body + PostVirtualMachineShutdownWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) + + PostVirtualMachineShutdownWithResponse(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) + + // PostVirtualMachineStartWithBodyWithResponse request with any body + PostVirtualMachineStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) + + PostVirtualMachineStartWithResponse(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) + + // PostVirtualMachineStopWithBodyWithResponse request with any body + PostVirtualMachineStopWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) + + PostVirtualMachineStopWithResponse(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) + + // GetVirtualMachinesBuildsVirtualMachineBuildWithResponse request + GetVirtualMachinesBuildsVirtualMachineBuildWithResponse(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinesBuildsVirtualMachineBuildResponse, error) + + // GetZonesWithResponse request + GetZonesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetZonesResponse, error) + + // GetZoneWithResponse request + GetZoneWithResponse(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*GetZoneResponse, error) +} + +type DeleteAddressListEntryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressListEntry The address list entry that has been destroyed. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *AddressListEntryNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteAddressListEntryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddressListEntryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddressListEntryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressListEntry The address list entry. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *AddressListEntryNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetAddressListEntryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddressListEntryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchAddressListEntryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressListEntry The address list entry. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *AddressListEntryNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchAddressListEntryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchAddressListEntryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddressListsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressLists A list of all global address lists. + AddressLists []GetAddressLists200ResponseAddressLists `json:"address_lists"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetAddressListsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddressListsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteAddressListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressList The address list that has been destroyed. + AddressList AddressList `json:"address_list"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *AddressListNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteAddressListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteAddressListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddressListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressList The address list. + AddressList AddressList `json:"address_list"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *AddressListNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetAddressListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddressListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchAddressListResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressList The address list. + AddressList AddressList `json:"address_list"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *AddressListNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchAddressListResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchAddressListResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetAddressListEntriesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressListEntries A list of all address list entries for the given address list. + AddressListEntries []AddressListEntry `json:"address_list_entries"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *AddressListNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetAddressListEntriesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetAddressListEntriesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostAddressListEntriesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // AddressListEntry The address list entry. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *AddressListNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostAddressListEntriesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostAddressListEntriesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCertificateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Certificate []Certificate `json:"certificate"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *CertificateNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetCertificateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCertificateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCountriesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Countries The list of countries + Countries []GetCountries200ResponseCountries `json:"countries"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetCountriesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCountriesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCountryResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Country The country details + Country Country `json:"country"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *CountryNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetCountryResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCountryResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCountryCountryStatesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // CountryStates The list of country states for the given country + CountryStates []GetCountryCountryStates200ResponseCountryStates `json:"country_states"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *CountryNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetCountryCountryStatesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCountryCountryStatesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCountryStateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // CountryState The country state details + CountryState CountryState `json:"country_state"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *CountryStateNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetCountryStateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCountryStateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCurrenciesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Currencies The list of currencies + Currencies []GetCurrencies200ResponseCurrencies `json:"currencies"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetCurrenciesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrenciesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetCurrencyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Currency The currency details + Currency Currency `json:"currency"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *CurrencyNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetCurrencyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetCurrencyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDataCentersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + DataCenters []GetDataCenters200ResponseDataCenters `json:"data_centers"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDataCentersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDataCentersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDataCenterResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + DataCenter GetDataCenter200ResponseDataCenter `json:"data_center"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DataCenterNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDataCenterResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDataCenterResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDataCenterDefaultNetworkResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Network The details for the requested network + Network GetDataCenterDefaultNetwork200ResponseNetwork `json:"network"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DataCenterNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDataCenterDefaultNetworkResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDataCenterDefaultNetworkResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDataCenterGpuTypesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + GpuTypes []GetDataCenterGPUTypes200ResponseGPUTypes `json:"gpu_types"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DataCenterNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDataCenterGpuTypesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDataCenterGpuTypesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteDiskBackupPolicyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicy The disk backup policy that has been destroyed + DiskBackupPolicy DeleteDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *DiskBackupPolicyNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteDiskBackupPolicyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteDiskBackupPolicyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiskBackupPolicyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicy The located disk backup policy + DiskBackupPolicy GetDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DiskBackupPolicyNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDiskBackupPolicyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiskBackupPolicyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchDiskBackupPolicyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicy The disk backup policy that has been updated + DiskBackupPolicy PatchDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *DiskBackupPolicyNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchDiskBackupPolicyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchDiskBackupPolicyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteDiskBackupPolicyScheduleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicy The disk backup policy that has been scheduled for deletion + DiskBackupPolicy DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + JSON400 *InvalidTimestamp400Res + JSON403 *PermissionDenied403Res + JSON404 *DiskBackupPolicyNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteDiskBackupPolicyScheduleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteDiskBackupPolicyScheduleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiskTemplateVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskTemplateVersion The disk template version details + DiskTemplateVersion GetDiskTemplateVersion200ResponseDiskTemplateVersion `json:"disk_template_version"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DiskTemplateVersionNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDiskTemplateVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiskTemplateVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiskTemplateVersionSpecResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskTemplateVersion The disk template version details + DiskTemplateVersion GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion `json:"disk_template_version"` + Spec TemplateSpec `json:"spec"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DiskTemplateVersionNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDiskTemplateVersionSpecResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiskTemplateVersionSpecResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiskTemplateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskTemplate The disk template details + DiskTemplate GetDiskTemplate200ResponseDiskTemplate `json:"disk_template"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DiskTemplateNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDiskTemplateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiskTemplateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiskTemplateVersionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + DiskTemplate GetDiskTemplateVersions200ResponseDiskTemplate `json:"disk_template"` + + // DiskTemplateVersions The disk template versions for the provided template + DiskTemplateVersions []GetDiskTemplateVersions200ResponseDiskTemplateVersions `json:"disk_template_versions"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DiskTemplateNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDiskTemplateVersionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiskTemplateVersionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiskResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Disk The disk details + Disk GetDisk200ResponseDisk `json:"disk"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DiskNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDiskResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiskResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDiskDiskBackupPoliciesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicies The disk backup policies for the provided disk + DiskBackupPolicies []GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *DiskNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDiskDiskBackupPoliciesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDiskDiskBackupPoliciesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostDiskDiskBackupPoliciesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicy The new disk backup policy that has been created + DiskBackupPolicy PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *DiskNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostDiskDiskBackupPoliciesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostDiskDiskBackupPoliciesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteDnsRecordResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Deleted bool `json:"deleted"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DNSRecordNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteDnsRecordResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteDnsRecordResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDnsRecordResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DnsRecord The DNS record for the provided organization + DnsRecord DNSRecord `json:"dns_record"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DNSRecordNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDnsRecordResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDnsRecordResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchDnsRecordResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DnsRecord The DNS record that has been updated + DnsRecord DNSRecord `json:"dns_record"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DNSRecordNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchDnsRecordResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchDnsRecordResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteDnsZoneResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Deleted bool `json:"deleted"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DNSZoneNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteDnsZoneResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteDnsZoneResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDnsZoneResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DnsZone The DNS zones for the provided organization + DnsZone DNSZone `json:"dns_zone"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DNSZoneNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDnsZoneResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDnsZoneResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchDnsZoneResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DnsZone The DNS zones for the provided organization + DnsZone DNSZone `json:"dns_zone"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DNSZoneNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchDnsZoneResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchDnsZoneResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetDnsZoneRecordsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DnsRecords The DNS record for the provided zone + DnsRecords []DNSRecord `json:"dns_records"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *DNSZoneNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDnsZoneRecordsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDnsZoneRecordsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostDnsZoneRecordsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + DnsRecord DNSRecord `json:"dns_record"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *DNSZoneNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostDnsZoneRecordsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostDnsZoneRecordsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostDnsZoneVerifyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DnsZone The DNS zones for the provided organization + DnsZone DNSZone `json:"dns_zone"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *DNSZoneNotFoundResponse + JSON422 *DNSZoneNotVerifiedResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostDnsZoneVerifyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostDnsZoneVerifyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteFileStorageVolumeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // FileStorageVolume The file storage volume that has been destroyed. + FileStorageVolume DeleteFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` + TrashObject TrashObject `json:"trash_object"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *FileStorageVolumeNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteFileStorageVolumeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteFileStorageVolumeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetFileStorageVolumeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // FileStorageVolume The file storage volume. + FileStorageVolume GetFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *FileStorageVolumeNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetFileStorageVolumeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetFileStorageVolumeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchFileStorageVolumeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // FileStorageVolume The file storage volume. + FileStorageVolume PatchFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *FileStorageVolumeNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchFileStorageVolumeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchFileStorageVolumeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetGpuTypesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + GpuTypes []GetGPUTypes200ResponseGPUTypes `json:"gpu_types"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetGpuTypesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetGpuTypesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetGpuTypeResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + GpuType GetGPUType200ResponseGPUType `json:"gpu_type"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *GPUTypeNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetGpuTypeResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetGpuTypeResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostInvalidateLinkedWebSessionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Status bool `json:"status"` + } + JSON400 *IdentityNotLinkedToWebSession400Res + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostInvalidateLinkedWebSessionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostInvalidateLinkedWebSessionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteIpAddressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *interface{} + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *IPAddressNotFoundResponse + JSON409 *ResourceDoesNotSupportUnallocationResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteIpAddressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteIpAddressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetIpAddressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Allocation The resource this address is allocated to + Allocation *GetIPAddress200ResponseAllocation `json:"allocation"` + + // IpAddress The IP address that has been located + IpAddress IPAddress `json:"ip_address"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *IPAddressNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetIpAddressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetIpAddressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchIpAddressResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // IpAddress The IP address that has been updated + IpAddress IPAddress `json:"ip_address"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *IPAddressNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchIpAddressResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchIpAddressResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostIpAddressUnallocateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *interface{} + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *IPAddressNotFoundResponse + JSON409 *ResourceDoesNotSupportUnallocationResponse + JSON422 *NoAllocationResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostIpAddressUnallocateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostIpAddressUnallocateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteLoadBalancerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancer The load balancer that has been destroyed + LoadBalancer DeleteLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *LoadBalancerNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteLoadBalancerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteLoadBalancerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetLoadBalancerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancer The load balancer + LoadBalancer GetLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *LoadBalancerNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetLoadBalancerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetLoadBalancerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchLoadBalancerResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancer The load balancer that has been updated + LoadBalancer PatchLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *LoadBalancerNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchLoadBalancerResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchLoadBalancerResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetLoadBalancerRulesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancerRules The load balancer rules for this load balancer + LoadBalancerRules []GetLoadBalancerRules200ResponseLoadBalancerRules `json:"load_balancer_rules"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *LoadBalancerNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetLoadBalancerRulesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetLoadBalancerRulesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostLoadBalancerRulesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancerRule The load balancer rule that has been created + LoadBalancerRule PostLoadBalancerRules200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *LoadBalancerNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostLoadBalancerRulesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostLoadBalancerRulesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteLoadBalancersRulesLoadBalancerRuleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancerRule The load balancer rule that has been destroyed + LoadBalancerRule DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *LoadBalancerRuleNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteLoadBalancersRulesLoadBalancerRuleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteLoadBalancersRulesLoadBalancerRuleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetLoadBalancersRulesLoadBalancerRuleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancerRule The resolved load balancer rule + LoadBalancerRule GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *LoadBalancerRuleNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetLoadBalancersRulesLoadBalancerRuleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetLoadBalancersRulesLoadBalancerRuleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchLoadBalancersRulesLoadBalancerRuleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancerRule The load balancer that has been updated + LoadBalancerRule PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *LoadBalancerRuleNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchLoadBalancersRulesLoadBalancerRuleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchLoadBalancersRulesLoadBalancerRuleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetNetworkResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Network The details for the requested network + Network Network `json:"network"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *NetworkNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetNetworkResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetNetworkResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOperatingSystemsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // OperatingSystems The list of available operating systems + OperatingSystems []GetOperatingSystems200ResponseOperatingSystems `json:"operating_systems"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOperatingSystemsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOperatingSystemsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOperatingSystemResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // OperatingSystem The operating system details + OperatingSystem OperatingSystem `json:"operating_system"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *OperatingSystemNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOperatingSystemResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOperatingSystemResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Organizations []GetOrganizations200ResponseOrganizations `json:"organizations"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Organization Organization `json:"organization"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationAddressListsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // AddressLists A list of all address lists for the given organization. + AddressLists []GetOrganizationAddressLists200ResponseAddressLists `json:"address_lists"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationAddressListsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationAddressListsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationAddressListsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // AddressList The address list. + AddressList AddressList `json:"address_list"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationAddressListsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationAddressListsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationAvailableNetworksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Networks []GetOrganizationAvailableNetworks200ResponseNetworks `json:"networks"` + VirtualNetworks []GetOrganizationAvailableNetworks200ResponseVirtualNetworks `json:"virtual_networks"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationAvailableNetworksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationAvailableNetworksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationCertificatesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Certificates []GetOrganizationCertificates200ResponseCertificates `json:"certificates"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationCertificatesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationCertificatesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationDiskBackupPoliciesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicies The disk backup policies for the provided organization + DiskBackupPolicies []GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationDiskBackupPoliciesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationDiskBackupPoliciesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationDiskTemplatesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskTemplates The list of disk templates + DiskTemplates []GetOrganizationDiskTemplates200ResponseDiskTemplates `json:"disk_templates"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OperatingSystemNotFoundOrganizationNotFound404Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationDiskTemplatesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationDiskTemplatesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationDisksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Disk The list of disks + Disk []GetOrganizationDisks200ResponseDisk `json:"disk"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationDisksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationDisksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationDnsZonesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DnsZones The DNS zones for the provided organization + DnsZones []DNSZone `json:"dns_zones"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationDnsZonesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationDnsZonesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationDnsZonesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // DnsZone The new DNS zone that has been created + DnsZone DNSZone `json:"dns_zone"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationDnsZonesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationDnsZonesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationDnsZonesNameserversResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Nameservers []string `json:"nameservers"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationDnsZonesNameserversResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationDnsZonesNameserversResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationFileStorageVolumesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // FileStorageVolumes A list of all file storage volumes for the given organization. + FileStorageVolumes []GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes `json:"file_storage_volumes"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationFileStorageVolumesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationFileStorageVolumesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationFileStorageVolumesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // FileStorageVolume The file storage volume. + FileStorageVolume PostOrganizationFileStorageVolumes201ResponseFileStorageVolume `json:"file_storage_volume"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationFileStorageVolumesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationFileStorageVolumesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationIpAddressesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // IpAddresses The IP addresses belonging to this organization + IpAddresses []GetOrganizationIPAddresses200ResponseIPAddresses `json:"ip_addresses"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationIpAddressesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationIpAddressesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationIpAddressesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // IpAddress The newly allocated IP address + IpAddress IPAddress `json:"ip_address"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *NetworkNotFoundOrganizationNotFound404Res + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response + JSON503 *NoAvailableAddressesResponse +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationIpAddressesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationIpAddressesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationLoadBalancersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancers The load balancers owned by this organization + LoadBalancers []GetOrganizationLoadBalancers200ResponseLoadBalancers `json:"load_balancers"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationLoadBalancersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationLoadBalancersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationLoadBalancersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // LoadBalancer The load balancer that has been created + LoadBalancer PostOrganizationLoadBalancers200ResponseLoadBalancer `json:"load_balancer"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationLoadBalancersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationLoadBalancersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationManagedResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Organizations []GetOrganizationManaged200ResponseOrganizations `json:"organizations"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationManagedResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationManagedResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationManagedResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + Organization Organization `json:"organization"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *OrganizationLimitReachedValidationError422Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationManagedResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationManagedResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationNetworkSpeedProfilesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // NetworkSpeedProfiles The network speed profiles available to this organization + NetworkSpeedProfiles []NetworkSpeedProfile `json:"network_speed_profiles"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationNetworkSpeedProfilesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationNetworkSpeedProfilesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationPolicyLimitsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + PolicyLimits OrganizationPolicy `json:"policy_limits"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationPolicyLimitsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationPolicyLimitsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationSecurityGroupsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + + // SecurityGroups The security groups owned by this organization + SecurityGroups []SecurityGroup `json:"security_groups"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationSecurityGroupsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationSecurityGroupsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationSecurityGroupsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroup The security group that has been created + SecurityGroup SecurityGroup `json:"security_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationSecurityGroupsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationSecurityGroupsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationSshKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + SshKeys []AuthSSHKey `json:"ssh_keys"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationSshKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationSshKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationSshKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + SshKey AuthSSHKey `json:"ssh_key"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationSshKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationSshKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationTagsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + + // Tags The details for the tags on the organization + Tags []GetOrganizationTags200ResponseTags `json:"tags"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationTagsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationTagsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationTagsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Tag The newly created tag + Tag Tag `json:"tag"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationTagsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationTagsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationTrashObjectsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + + // TrashObjects The trash objects that belong to this organization + TrashObjects []TrashObject `json:"trash_objects"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationTrashObjectsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationTrashObjectsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationTrashObjectsPurgeAllResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task Task `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON406 *TaskQueueingErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationTrashObjectsPurgeAllResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationTrashObjectsPurgeAllResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationUsersWithAccessResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + Users []GetOrganizationUsersWithAccess200ResponseUsers `json:"users"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationUsersWithAccessResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationUsersWithAccessResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationVirtualMachineGroupsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineGroups The virtual machine groups for the provided organization + VirtualMachineGroups []VirtualMachineGroup `json:"virtual_machine_groups"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationVirtualMachineGroupsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationVirtualMachineGroupsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationVirtualMachineGroupsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineGroup The new virtual machine group details + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationVirtualMachineGroupsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationVirtualMachineGroupsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetOrganizationVirtualMachinesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + VirtualMachines []GetOrganizationVirtualMachines200ResponseVirtualMachines `json:"virtual_machines"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetOrganizationVirtualMachinesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetOrganizationVirtualMachinesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationVirtualMachinesBuildResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // Build Deprecated, please use "virtual_machine_build" instead + Build PostOrganizationVirtualMachinesBuild201ResponseBuild `json:"build"` + Hostname string `json:"hostname"` + Task PostOrganizationVirtualMachinesBuild201ResponseTask `json:"task"` + VirtualMachineBuild PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild `json:"virtual_machine_build"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + JSON404 *DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res + JSON422 *LocationRequiredValidationError422Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationVirtualMachinesBuildResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationVirtualMachinesBuildResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostOrganizationVirtualMachinesBuildFromSpecResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + // Build Deprecated, please use "virtual_machine_build" instead + Build PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild `json:"build"` + Hostname string `json:"hostname"` + Task PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask `json:"task"` + VirtualMachineBuild PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild `json:"virtual_machine_build"` + } + JSON400 *InvalidSpecXML400Res + JSON403 *OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + JSON404 *OrganizationNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostOrganizationVirtualMachinesBuildFromSpecResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostOrganizationVirtualMachinesBuildFromSpecResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteSecurityGroupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroup The security group that has been destroyed + SecurityGroup DeleteSecurityGroup200ResponseSecurityGroup `json:"security_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SecurityGroupNotFoundResponse + JSON409 *DeletionRestrictedResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteSecurityGroupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSecurityGroupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSecurityGroupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroup The security group + SecurityGroup SecurityGroup `json:"security_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *SecurityGroupNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetSecurityGroupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSecurityGroupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchSecurityGroupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroup The security group that has been updated + SecurityGroup SecurityGroup `json:"security_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SecurityGroupNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchSecurityGroupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchSecurityGroupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSecurityGroupRulesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + + // SecurityGroupRules The security group rules for this security group + SecurityGroupRules []GetSecurityGroupRules200ResponseSecurityGroupRules `json:"security_group_rules"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SecurityGroupNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetSecurityGroupRulesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSecurityGroupRulesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostSecurityGroupRulesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroupRule The security group rule that has been created + SecurityGroupRule PostSecurityGroupRules200ResponseSecurityGroupRule `json:"security_group_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SecurityGroupNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostSecurityGroupRulesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostSecurityGroupRulesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteSecurityGroupsRulesSecurityGroupRuleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroupRule The security group rule that has been destroyed + SecurityGroupRule DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SecurityGroupRuleNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteSecurityGroupsRulesSecurityGroupRuleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSecurityGroupsRulesSecurityGroupRuleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetSecurityGroupsRulesSecurityGroupRuleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroupRule The resolved security group rule + SecurityGroupRule GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SecurityGroupRuleNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetSecurityGroupsRulesSecurityGroupRuleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetSecurityGroupsRulesSecurityGroupRuleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchSecurityGroupsRulesSecurityGroupRuleResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // SecurityGroupRule The security group that has been updated + SecurityGroupRule PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SecurityGroupRuleNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchSecurityGroupsRulesSecurityGroupRuleResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchSecurityGroupsRulesSecurityGroupRuleResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteSshKeyResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + SshKey AuthSSHKey `json:"ssh_key"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *SSHKeyNotFoundResponse + JSON409 *DeletionRestrictedResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteSshKeyResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteSshKeyResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTagResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Tag The newly deleted tag + Tag Tag `json:"tag"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *TagNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteTagResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTagResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTagResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Tag The details for the requested tag + Tag Tag `json:"tag"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *TagNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetTagResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTagResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchTagResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Tag The newly updated tag + Tag Tag `json:"tag"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *TagNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchTagResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchTagResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTaskResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task Task `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *TaskNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetTaskResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTaskResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteTrashObjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task Task `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *TrashObjectNotFoundResponse + JSON406 *TaskQueueingErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteTrashObjectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteTrashObjectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetTrashObjectResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // TrashObject The requested trash object + TrashObject TrashObject `json:"trash_object"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *TrashObjectNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetTrashObjectResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetTrashObjectResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostTrashObjectRestoreResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // TrashObject The requested trash object + TrashObject TrashObject `json:"trash_object"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *TrashObjectNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostTrashObjectRestoreResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostTrashObjectRestoreResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetUsersCurrentResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + ApiTokenId string `json:"api_token_id"` + Organizations []GetUsersCurrent200ResponseOrganizations `json:"organizations"` + User User `json:"user"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *NoUserAssociatedWithIdentityResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetUsersCurrentResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetUsersCurrentResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineAuthorizedKeysResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + AuthorizedKeys string `json:"authorized_keys"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *NoVirtualMachineForAPITokenResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineAuthorizedKeysResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineAuthorizedKeysResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteVirtualMachineGroupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineGroup The details for the deleted virtual machine group + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineGroupNotFoundResponse + JSON409 *DeletionRestrictedResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteVirtualMachineGroupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteVirtualMachineGroupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineGroupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineGroup The virtual machine group details + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineGroupNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineGroupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineGroupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchVirtualMachineGroupResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineGroup The updated virtual machine group details + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineGroupNotFoundResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchVirtualMachineGroupResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchVirtualMachineGroupResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVMNIVMNIResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineNetworkInterface The network interface details + VirtualMachineNetworkInterface GetVMNIVMNI200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachineNetworkInterfaceNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVMNIVMNIResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVMNIVMNIResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineNetworkInterfaceAllocateIpResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineNetworkInterface The network interface details + VirtualMachineNetworkInterface PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res + JSON422 *IPAlreadyAllocatedInvalidIP422Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineNetworkInterfaceAllocateIpResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineNetworkInterfaceAllocateIpResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineNetworkInterfaceAllocateNewIpResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // IpAddress The newly allocated IP address + IpAddress IPAddress `json:"ip_address"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNetworkInterfaceNotFoundResponse + JSON429 *APIAuthenticator429Response + JSON503 *NoAvailableAddressesResponse +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineNetworkInterfaceAllocateNewIpResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineNetworkInterfaceAllocateNewIpResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // IpAddresses The IP addresses available for this network interface + IpAddresses []IPAddress `json:"ip_addresses"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachineNetworkInterfaceNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Task The task responsible for updating the virtual machine network interface speed profile + Task Task `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res + JSON406 *TaskQueueingErrorResponse + JSON422 *SpeedProfileAlreadyAssignedResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachinePackagesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + VirtualMachinePackages []GetVirtualMachinePackages200ResponseVirtualMachinePackages `json:"virtual_machine_packages"` + } + JSON400 *APIAuthenticator400Response + JSON403 *OrganizationNotActivatedOrganizationSuspended403Res + JSON404 *OrganizationNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachinePackagesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachinePackagesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachinePackageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + VirtualMachinePackage VirtualMachinePackage `json:"virtual_machine_package"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachinePackageNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachinePackageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachinePackageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type DeleteVirtualMachineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + TrashObject TrashObject `json:"trash_object"` + VirtualMachine DeleteVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r DeleteVirtualMachineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r DeleteVirtualMachineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + VirtualMachine GetVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PatchVirtualMachineResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachine The newly updated virtual machine + VirtualMachine PatchVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PatchVirtualMachineResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PatchVirtualMachineResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineAllocateIpResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // IpAddress The newly allocated IP address + IpAddress IPAddress `json:"ip_address"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *IPAddressNotFoundVirtualMachineNotFound404Res + JSON406 *ObjectInTrashResponse + JSON422 *IPAlreadyAllocatedNoInterfaceAvailable422Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineAllocateIpResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineAllocateIpResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineConsoleSessionsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON201 *struct { + ConsoleSession PostVirtualMachineConsoleSessions201ResponseConsoleSession `json:"console_session"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashVirtualMachineMustBeStarted406Res + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineConsoleSessionsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineConsoleSessionsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineDiskBackupPoliciesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicies The disk backup policies for the provided virtual machine + DiskBackupPolicies []GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineDiskBackupPoliciesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineDiskBackupPoliciesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineDiskBackupPoliciesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // DiskBackupPolicy The new disk backup policy that has been created + DiskBackupPolicy PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineDiskBackupPoliciesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineDiskBackupPoliciesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineDisksResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Disks The list of disks + Disks []GetVirtualMachineDisks200ResponseDisks `json:"disks"` + Pagination PaginationObject `json:"pagination"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineDisksResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineDisksResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutVirtualMachineFlexibleResourcesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task Task `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashTaskQueueingError406Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PutVirtualMachineFlexibleResourcesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutVirtualMachineFlexibleResourcesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineNetworkInterfacesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Pagination PaginationObject `json:"pagination"` + + // VirtualMachineNetworkInterfaces The network interfaces for this virtual machine + VirtualMachineNetworkInterfaces []GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces `json:"virtual_machine_network_interfaces"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineNetworkInterfacesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineNetworkInterfacesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachineNetworkInterfaceResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // VirtualMachineNetworkInterface The network interface details + VirtualMachineNetworkInterface GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res + JSON406 *ObjectInTrashResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachineNetworkInterfaceResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachineNetworkInterfaceResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PutVirtualMachinePackageResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task Task `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundVirtualMachinePackageNotFound404Res + JSON406 *ObjectInTrashTaskQueueingError406Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PutVirtualMachinePackageResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PutVirtualMachinePackageResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineResetResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task PostVirtualMachineReset200ResponseTask `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashTaskQueueingError406Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineResetResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineResetResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineShutdownResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task PostVirtualMachineShutdown200ResponseTask `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashTaskQueueingError406Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineShutdownResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineShutdownResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineStartResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task PostVirtualMachineStart200ResponseTask `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashTaskQueueingError406Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineStartResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineStartResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostVirtualMachineStopResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + Task PostVirtualMachineStop200ResponseTask `json:"task"` + } + JSON400 *APIAuthenticator400Response + JSON403 *PermissionDenied403Res + JSON404 *VirtualMachineNotFoundResponse + JSON406 *ObjectInTrashTaskQueueingError406Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostVirtualMachineStopResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostVirtualMachineStopResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachinesBuildsVirtualMachineBuildResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + VirtualMachineBuild GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild `json:"virtual_machine_build"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *VirtualMachineBuildNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachinesBuildsVirtualMachineBuildResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachinesBuildsVirtualMachineBuildResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetZonesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Zones The zones available to the current identity + Zones []GetZones200ResponseZones `json:"zones"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetZonesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetZonesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetZoneResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Zone The zone details + Zone Zone `json:"zone"` + } + JSON400 *APIAuthenticator400Response + JSON403 *APIAuthenticator403Response + JSON404 *ZoneNotFoundResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetZoneResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetZoneResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// DeleteAddressListEntryWithBodyWithResponse request with arbitrary body returning *DeleteAddressListEntryResponse +func (c *ClientWithResponses) DeleteAddressListEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteAddressListEntryResponse, error) { + rsp, err := c.DeleteAddressListEntryWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAddressListEntryResponse(rsp) +} + +func (c *ClientWithResponses) DeleteAddressListEntryWithResponse(ctx context.Context, body DeleteAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteAddressListEntryResponse, error) { + rsp, err := c.DeleteAddressListEntry(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAddressListEntryResponse(rsp) +} + +// GetAddressListEntryWithResponse request returning *GetAddressListEntryResponse +func (c *ClientWithResponses) GetAddressListEntryWithResponse(ctx context.Context, params *GetAddressListEntryParams, reqEditors ...RequestEditorFn) (*GetAddressListEntryResponse, error) { + rsp, err := c.GetAddressListEntry(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddressListEntryResponse(rsp) +} + +// PatchAddressListEntryWithBodyWithResponse request with arbitrary body returning *PatchAddressListEntryResponse +func (c *ClientWithResponses) PatchAddressListEntryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchAddressListEntryResponse, error) { + rsp, err := c.PatchAddressListEntryWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchAddressListEntryResponse(rsp) +} + +func (c *ClientWithResponses) PatchAddressListEntryWithResponse(ctx context.Context, body PatchAddressListEntryJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchAddressListEntryResponse, error) { + rsp, err := c.PatchAddressListEntry(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchAddressListEntryResponse(rsp) +} + +// GetAddressListsWithResponse request returning *GetAddressListsResponse +func (c *ClientWithResponses) GetAddressListsWithResponse(ctx context.Context, params *GetAddressListsParams, reqEditors ...RequestEditorFn) (*GetAddressListsResponse, error) { + rsp, err := c.GetAddressLists(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddressListsResponse(rsp) +} + +// DeleteAddressListWithBodyWithResponse request with arbitrary body returning *DeleteAddressListResponse +func (c *ClientWithResponses) DeleteAddressListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteAddressListResponse, error) { + rsp, err := c.DeleteAddressListWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAddressListResponse(rsp) +} + +func (c *ClientWithResponses) DeleteAddressListWithResponse(ctx context.Context, body DeleteAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteAddressListResponse, error) { + rsp, err := c.DeleteAddressList(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteAddressListResponse(rsp) +} + +// GetAddressListWithResponse request returning *GetAddressListResponse +func (c *ClientWithResponses) GetAddressListWithResponse(ctx context.Context, params *GetAddressListParams, reqEditors ...RequestEditorFn) (*GetAddressListResponse, error) { + rsp, err := c.GetAddressList(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddressListResponse(rsp) +} + +// PatchAddressListWithBodyWithResponse request with arbitrary body returning *PatchAddressListResponse +func (c *ClientWithResponses) PatchAddressListWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchAddressListResponse, error) { + rsp, err := c.PatchAddressListWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchAddressListResponse(rsp) +} + +func (c *ClientWithResponses) PatchAddressListWithResponse(ctx context.Context, body PatchAddressListJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchAddressListResponse, error) { + rsp, err := c.PatchAddressList(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchAddressListResponse(rsp) +} + +// GetAddressListEntriesWithResponse request returning *GetAddressListEntriesResponse +func (c *ClientWithResponses) GetAddressListEntriesWithResponse(ctx context.Context, params *GetAddressListEntriesParams, reqEditors ...RequestEditorFn) (*GetAddressListEntriesResponse, error) { + rsp, err := c.GetAddressListEntries(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetAddressListEntriesResponse(rsp) +} + +// PostAddressListEntriesWithBodyWithResponse request with arbitrary body returning *PostAddressListEntriesResponse +func (c *ClientWithResponses) PostAddressListEntriesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostAddressListEntriesResponse, error) { + rsp, err := c.PostAddressListEntriesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostAddressListEntriesResponse(rsp) +} + +func (c *ClientWithResponses) PostAddressListEntriesWithResponse(ctx context.Context, body PostAddressListEntriesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostAddressListEntriesResponse, error) { + rsp, err := c.PostAddressListEntries(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostAddressListEntriesResponse(rsp) +} + +// GetCertificateWithResponse request returning *GetCertificateResponse +func (c *ClientWithResponses) GetCertificateWithResponse(ctx context.Context, params *GetCertificateParams, reqEditors ...RequestEditorFn) (*GetCertificateResponse, error) { + rsp, err := c.GetCertificate(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCertificateResponse(rsp) +} + +// GetCountriesWithResponse request returning *GetCountriesResponse +func (c *ClientWithResponses) GetCountriesWithResponse(ctx context.Context, params *GetCountriesParams, reqEditors ...RequestEditorFn) (*GetCountriesResponse, error) { + rsp, err := c.GetCountries(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCountriesResponse(rsp) +} + +// GetCountryWithResponse request returning *GetCountryResponse +func (c *ClientWithResponses) GetCountryWithResponse(ctx context.Context, params *GetCountryParams, reqEditors ...RequestEditorFn) (*GetCountryResponse, error) { + rsp, err := c.GetCountry(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCountryResponse(rsp) +} + +// GetCountryCountryStatesWithResponse request returning *GetCountryCountryStatesResponse +func (c *ClientWithResponses) GetCountryCountryStatesWithResponse(ctx context.Context, params *GetCountryCountryStatesParams, reqEditors ...RequestEditorFn) (*GetCountryCountryStatesResponse, error) { + rsp, err := c.GetCountryCountryStates(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCountryCountryStatesResponse(rsp) +} + +// GetCountryStateWithResponse request returning *GetCountryStateResponse +func (c *ClientWithResponses) GetCountryStateWithResponse(ctx context.Context, params *GetCountryStateParams, reqEditors ...RequestEditorFn) (*GetCountryStateResponse, error) { + rsp, err := c.GetCountryState(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCountryStateResponse(rsp) +} + +// GetCurrenciesWithResponse request returning *GetCurrenciesResponse +func (c *ClientWithResponses) GetCurrenciesWithResponse(ctx context.Context, params *GetCurrenciesParams, reqEditors ...RequestEditorFn) (*GetCurrenciesResponse, error) { + rsp, err := c.GetCurrencies(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrenciesResponse(rsp) +} + +// GetCurrencyWithResponse request returning *GetCurrencyResponse +func (c *ClientWithResponses) GetCurrencyWithResponse(ctx context.Context, params *GetCurrencyParams, reqEditors ...RequestEditorFn) (*GetCurrencyResponse, error) { + rsp, err := c.GetCurrency(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetCurrencyResponse(rsp) +} + +// GetDataCentersWithResponse request returning *GetDataCentersResponse +func (c *ClientWithResponses) GetDataCentersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDataCentersResponse, error) { + rsp, err := c.GetDataCenters(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDataCentersResponse(rsp) +} + +// GetDataCenterWithResponse request returning *GetDataCenterResponse +func (c *ClientWithResponses) GetDataCenterWithResponse(ctx context.Context, params *GetDataCenterParams, reqEditors ...RequestEditorFn) (*GetDataCenterResponse, error) { + rsp, err := c.GetDataCenter(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDataCenterResponse(rsp) +} + +// GetDataCenterDefaultNetworkWithResponse request returning *GetDataCenterDefaultNetworkResponse +func (c *ClientWithResponses) GetDataCenterDefaultNetworkWithResponse(ctx context.Context, params *GetDataCenterDefaultNetworkParams, reqEditors ...RequestEditorFn) (*GetDataCenterDefaultNetworkResponse, error) { + rsp, err := c.GetDataCenterDefaultNetwork(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDataCenterDefaultNetworkResponse(rsp) +} + +// GetDataCenterGpuTypesWithResponse request returning *GetDataCenterGpuTypesResponse +func (c *ClientWithResponses) GetDataCenterGpuTypesWithResponse(ctx context.Context, params *GetDataCenterGpuTypesParams, reqEditors ...RequestEditorFn) (*GetDataCenterGpuTypesResponse, error) { + rsp, err := c.GetDataCenterGpuTypes(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDataCenterGpuTypesResponse(rsp) +} + +// DeleteDiskBackupPolicyWithBodyWithResponse request with arbitrary body returning *DeleteDiskBackupPolicyResponse +func (c *ClientWithResponses) DeleteDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) { + rsp, err := c.DeleteDiskBackupPolicyWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDiskBackupPolicyResponse(rsp) +} + +func (c *ClientWithResponses) DeleteDiskBackupPolicyWithResponse(ctx context.Context, body DeleteDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyResponse, error) { + rsp, err := c.DeleteDiskBackupPolicy(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDiskBackupPolicyResponse(rsp) +} + +// GetDiskBackupPolicyWithResponse request returning *GetDiskBackupPolicyResponse +func (c *ClientWithResponses) GetDiskBackupPolicyWithResponse(ctx context.Context, params *GetDiskBackupPolicyParams, reqEditors ...RequestEditorFn) (*GetDiskBackupPolicyResponse, error) { + rsp, err := c.GetDiskBackupPolicy(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiskBackupPolicyResponse(rsp) +} + +// PatchDiskBackupPolicyWithBodyWithResponse request with arbitrary body returning *PatchDiskBackupPolicyResponse +func (c *ClientWithResponses) PatchDiskBackupPolicyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) { + rsp, err := c.PatchDiskBackupPolicyWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchDiskBackupPolicyResponse(rsp) +} + +func (c *ClientWithResponses) PatchDiskBackupPolicyWithResponse(ctx context.Context, body PatchDiskBackupPolicyJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDiskBackupPolicyResponse, error) { + rsp, err := c.PatchDiskBackupPolicy(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchDiskBackupPolicyResponse(rsp) +} + +// DeleteDiskBackupPolicyScheduleWithBodyWithResponse request with arbitrary body returning *DeleteDiskBackupPolicyScheduleResponse +func (c *ClientWithResponses) DeleteDiskBackupPolicyScheduleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) { + rsp, err := c.DeleteDiskBackupPolicyScheduleWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDiskBackupPolicyScheduleResponse(rsp) +} + +func (c *ClientWithResponses) DeleteDiskBackupPolicyScheduleWithResponse(ctx context.Context, body DeleteDiskBackupPolicyScheduleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDiskBackupPolicyScheduleResponse, error) { + rsp, err := c.DeleteDiskBackupPolicySchedule(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDiskBackupPolicyScheduleResponse(rsp) +} + +// GetDiskTemplateVersionWithResponse request returning *GetDiskTemplateVersionResponse +func (c *ClientWithResponses) GetDiskTemplateVersionWithResponse(ctx context.Context, params *GetDiskTemplateVersionParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionResponse, error) { + rsp, err := c.GetDiskTemplateVersion(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiskTemplateVersionResponse(rsp) +} + +// GetDiskTemplateVersionSpecWithResponse request returning *GetDiskTemplateVersionSpecResponse +func (c *ClientWithResponses) GetDiskTemplateVersionSpecWithResponse(ctx context.Context, params *GetDiskTemplateVersionSpecParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionSpecResponse, error) { + rsp, err := c.GetDiskTemplateVersionSpec(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiskTemplateVersionSpecResponse(rsp) +} + +// GetDiskTemplateWithResponse request returning *GetDiskTemplateResponse +func (c *ClientWithResponses) GetDiskTemplateWithResponse(ctx context.Context, params *GetDiskTemplateParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateResponse, error) { + rsp, err := c.GetDiskTemplate(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiskTemplateResponse(rsp) +} + +// GetDiskTemplateVersionsWithResponse request returning *GetDiskTemplateVersionsResponse +func (c *ClientWithResponses) GetDiskTemplateVersionsWithResponse(ctx context.Context, params *GetDiskTemplateVersionsParams, reqEditors ...RequestEditorFn) (*GetDiskTemplateVersionsResponse, error) { + rsp, err := c.GetDiskTemplateVersions(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiskTemplateVersionsResponse(rsp) +} + +// GetDiskWithResponse request returning *GetDiskResponse +func (c *ClientWithResponses) GetDiskWithResponse(ctx context.Context, params *GetDiskParams, reqEditors ...RequestEditorFn) (*GetDiskResponse, error) { + rsp, err := c.GetDisk(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiskResponse(rsp) +} + +// GetDiskDiskBackupPoliciesWithResponse request returning *GetDiskDiskBackupPoliciesResponse +func (c *ClientWithResponses) GetDiskDiskBackupPoliciesWithResponse(ctx context.Context, params *GetDiskDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetDiskDiskBackupPoliciesResponse, error) { + rsp, err := c.GetDiskDiskBackupPolicies(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDiskDiskBackupPoliciesResponse(rsp) +} + +// PostDiskDiskBackupPoliciesWithBodyWithResponse request with arbitrary body returning *PostDiskDiskBackupPoliciesResponse +func (c *ClientWithResponses) PostDiskDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) { + rsp, err := c.PostDiskDiskBackupPoliciesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostDiskDiskBackupPoliciesResponse(rsp) +} + +func (c *ClientWithResponses) PostDiskDiskBackupPoliciesWithResponse(ctx context.Context, body PostDiskDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDiskDiskBackupPoliciesResponse, error) { + rsp, err := c.PostDiskDiskBackupPolicies(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostDiskDiskBackupPoliciesResponse(rsp) +} + +// DeleteDnsRecordWithBodyWithResponse request with arbitrary body returning *DeleteDnsRecordResponse +func (c *ClientWithResponses) DeleteDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) { + rsp, err := c.DeleteDnsRecordWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDnsRecordResponse(rsp) +} + +func (c *ClientWithResponses) DeleteDnsRecordWithResponse(ctx context.Context, body DeleteDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsRecordResponse, error) { + rsp, err := c.DeleteDnsRecord(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDnsRecordResponse(rsp) +} + +// GetDnsRecordWithResponse request returning *GetDnsRecordResponse +func (c *ClientWithResponses) GetDnsRecordWithResponse(ctx context.Context, params *GetDnsRecordParams, reqEditors ...RequestEditorFn) (*GetDnsRecordResponse, error) { + rsp, err := c.GetDnsRecord(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDnsRecordResponse(rsp) +} + +// PatchDnsRecordWithBodyWithResponse request with arbitrary body returning *PatchDnsRecordResponse +func (c *ClientWithResponses) PatchDnsRecordWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) { + rsp, err := c.PatchDnsRecordWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchDnsRecordResponse(rsp) +} + +func (c *ClientWithResponses) PatchDnsRecordWithResponse(ctx context.Context, body PatchDnsRecordJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsRecordResponse, error) { + rsp, err := c.PatchDnsRecord(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchDnsRecordResponse(rsp) +} + +// DeleteDnsZoneWithBodyWithResponse request with arbitrary body returning *DeleteDnsZoneResponse +func (c *ClientWithResponses) DeleteDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) { + rsp, err := c.DeleteDnsZoneWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDnsZoneResponse(rsp) +} + +func (c *ClientWithResponses) DeleteDnsZoneWithResponse(ctx context.Context, body DeleteDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteDnsZoneResponse, error) { + rsp, err := c.DeleteDnsZone(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteDnsZoneResponse(rsp) +} + +// GetDnsZoneWithResponse request returning *GetDnsZoneResponse +func (c *ClientWithResponses) GetDnsZoneWithResponse(ctx context.Context, params *GetDnsZoneParams, reqEditors ...RequestEditorFn) (*GetDnsZoneResponse, error) { + rsp, err := c.GetDnsZone(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDnsZoneResponse(rsp) +} + +// PatchDnsZoneWithBodyWithResponse request with arbitrary body returning *PatchDnsZoneResponse +func (c *ClientWithResponses) PatchDnsZoneWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) { + rsp, err := c.PatchDnsZoneWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchDnsZoneResponse(rsp) +} + +func (c *ClientWithResponses) PatchDnsZoneWithResponse(ctx context.Context, body PatchDnsZoneJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchDnsZoneResponse, error) { + rsp, err := c.PatchDnsZone(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchDnsZoneResponse(rsp) +} + +// GetDnsZoneRecordsWithResponse request returning *GetDnsZoneRecordsResponse +func (c *ClientWithResponses) GetDnsZoneRecordsWithResponse(ctx context.Context, params *GetDnsZoneRecordsParams, reqEditors ...RequestEditorFn) (*GetDnsZoneRecordsResponse, error) { + rsp, err := c.GetDnsZoneRecords(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDnsZoneRecordsResponse(rsp) +} + +// PostDnsZoneRecordsWithBodyWithResponse request with arbitrary body returning *PostDnsZoneRecordsResponse +func (c *ClientWithResponses) PostDnsZoneRecordsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) { + rsp, err := c.PostDnsZoneRecordsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostDnsZoneRecordsResponse(rsp) +} + +func (c *ClientWithResponses) PostDnsZoneRecordsWithResponse(ctx context.Context, body PostDnsZoneRecordsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneRecordsResponse, error) { + rsp, err := c.PostDnsZoneRecords(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostDnsZoneRecordsResponse(rsp) +} + +// PostDnsZoneVerifyWithBodyWithResponse request with arbitrary body returning *PostDnsZoneVerifyResponse +func (c *ClientWithResponses) PostDnsZoneVerifyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) { + rsp, err := c.PostDnsZoneVerifyWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostDnsZoneVerifyResponse(rsp) +} + +func (c *ClientWithResponses) PostDnsZoneVerifyWithResponse(ctx context.Context, body PostDnsZoneVerifyJSONRequestBody, reqEditors ...RequestEditorFn) (*PostDnsZoneVerifyResponse, error) { + rsp, err := c.PostDnsZoneVerify(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostDnsZoneVerifyResponse(rsp) +} + +// DeleteFileStorageVolumeWithBodyWithResponse request with arbitrary body returning *DeleteFileStorageVolumeResponse +func (c *ClientWithResponses) DeleteFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) { + rsp, err := c.DeleteFileStorageVolumeWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteFileStorageVolumeResponse(rsp) +} + +func (c *ClientWithResponses) DeleteFileStorageVolumeWithResponse(ctx context.Context, body DeleteFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteFileStorageVolumeResponse, error) { + rsp, err := c.DeleteFileStorageVolume(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteFileStorageVolumeResponse(rsp) +} + +// GetFileStorageVolumeWithResponse request returning *GetFileStorageVolumeResponse +func (c *ClientWithResponses) GetFileStorageVolumeWithResponse(ctx context.Context, params *GetFileStorageVolumeParams, reqEditors ...RequestEditorFn) (*GetFileStorageVolumeResponse, error) { + rsp, err := c.GetFileStorageVolume(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetFileStorageVolumeResponse(rsp) +} + +// PatchFileStorageVolumeWithBodyWithResponse request with arbitrary body returning *PatchFileStorageVolumeResponse +func (c *ClientWithResponses) PatchFileStorageVolumeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) { + rsp, err := c.PatchFileStorageVolumeWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchFileStorageVolumeResponse(rsp) +} + +func (c *ClientWithResponses) PatchFileStorageVolumeWithResponse(ctx context.Context, body PatchFileStorageVolumeJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchFileStorageVolumeResponse, error) { + rsp, err := c.PatchFileStorageVolume(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchFileStorageVolumeResponse(rsp) +} + +// GetGpuTypesWithResponse request returning *GetGpuTypesResponse +func (c *ClientWithResponses) GetGpuTypesWithResponse(ctx context.Context, params *GetGpuTypesParams, reqEditors ...RequestEditorFn) (*GetGpuTypesResponse, error) { + rsp, err := c.GetGpuTypes(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetGpuTypesResponse(rsp) +} + +// GetGpuTypeWithResponse request returning *GetGpuTypeResponse +func (c *ClientWithResponses) GetGpuTypeWithResponse(ctx context.Context, params *GetGpuTypeParams, reqEditors ...RequestEditorFn) (*GetGpuTypeResponse, error) { + rsp, err := c.GetGpuType(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetGpuTypeResponse(rsp) +} + +// PostInvalidateLinkedWebSessionWithBodyWithResponse request with arbitrary body returning *PostInvalidateLinkedWebSessionResponse +func (c *ClientWithResponses) PostInvalidateLinkedWebSessionWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) { + rsp, err := c.PostInvalidateLinkedWebSessionWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostInvalidateLinkedWebSessionResponse(rsp) +} + +func (c *ClientWithResponses) PostInvalidateLinkedWebSessionWithResponse(ctx context.Context, body PostInvalidateLinkedWebSessionJSONRequestBody, reqEditors ...RequestEditorFn) (*PostInvalidateLinkedWebSessionResponse, error) { + rsp, err := c.PostInvalidateLinkedWebSession(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostInvalidateLinkedWebSessionResponse(rsp) +} + +// DeleteIpAddressWithBodyWithResponse request with arbitrary body returning *DeleteIpAddressResponse +func (c *ClientWithResponses) DeleteIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) { + rsp, err := c.DeleteIpAddressWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteIpAddressResponse(rsp) +} + +func (c *ClientWithResponses) DeleteIpAddressWithResponse(ctx context.Context, body DeleteIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteIpAddressResponse, error) { + rsp, err := c.DeleteIpAddress(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteIpAddressResponse(rsp) +} + +// GetIpAddressWithResponse request returning *GetIpAddressResponse +func (c *ClientWithResponses) GetIpAddressWithResponse(ctx context.Context, params *GetIpAddressParams, reqEditors ...RequestEditorFn) (*GetIpAddressResponse, error) { + rsp, err := c.GetIpAddress(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetIpAddressResponse(rsp) +} + +// PatchIpAddressWithBodyWithResponse request with arbitrary body returning *PatchIpAddressResponse +func (c *ClientWithResponses) PatchIpAddressWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) { + rsp, err := c.PatchIpAddressWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchIpAddressResponse(rsp) +} + +func (c *ClientWithResponses) PatchIpAddressWithResponse(ctx context.Context, body PatchIpAddressJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchIpAddressResponse, error) { + rsp, err := c.PatchIpAddress(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchIpAddressResponse(rsp) +} + +// PostIpAddressUnallocateWithBodyWithResponse request with arbitrary body returning *PostIpAddressUnallocateResponse +func (c *ClientWithResponses) PostIpAddressUnallocateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) { + rsp, err := c.PostIpAddressUnallocateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostIpAddressUnallocateResponse(rsp) +} + +func (c *ClientWithResponses) PostIpAddressUnallocateWithResponse(ctx context.Context, body PostIpAddressUnallocateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostIpAddressUnallocateResponse, error) { + rsp, err := c.PostIpAddressUnallocate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostIpAddressUnallocateResponse(rsp) +} + +// DeleteLoadBalancerWithBodyWithResponse request with arbitrary body returning *DeleteLoadBalancerResponse +func (c *ClientWithResponses) DeleteLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) { + rsp, err := c.DeleteLoadBalancerWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteLoadBalancerResponse(rsp) +} + +func (c *ClientWithResponses) DeleteLoadBalancerWithResponse(ctx context.Context, body DeleteLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancerResponse, error) { + rsp, err := c.DeleteLoadBalancer(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteLoadBalancerResponse(rsp) +} + +// GetLoadBalancerWithResponse request returning *GetLoadBalancerResponse +func (c *ClientWithResponses) GetLoadBalancerWithResponse(ctx context.Context, params *GetLoadBalancerParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerResponse, error) { + rsp, err := c.GetLoadBalancer(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetLoadBalancerResponse(rsp) +} + +// PatchLoadBalancerWithBodyWithResponse request with arbitrary body returning *PatchLoadBalancerResponse +func (c *ClientWithResponses) PatchLoadBalancerWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) { + rsp, err := c.PatchLoadBalancerWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchLoadBalancerResponse(rsp) +} + +func (c *ClientWithResponses) PatchLoadBalancerWithResponse(ctx context.Context, body PatchLoadBalancerJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancerResponse, error) { + rsp, err := c.PatchLoadBalancer(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchLoadBalancerResponse(rsp) +} + +// GetLoadBalancerRulesWithResponse request returning *GetLoadBalancerRulesResponse +func (c *ClientWithResponses) GetLoadBalancerRulesWithResponse(ctx context.Context, params *GetLoadBalancerRulesParams, reqEditors ...RequestEditorFn) (*GetLoadBalancerRulesResponse, error) { + rsp, err := c.GetLoadBalancerRules(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetLoadBalancerRulesResponse(rsp) +} + +// PostLoadBalancerRulesWithBodyWithResponse request with arbitrary body returning *PostLoadBalancerRulesResponse +func (c *ClientWithResponses) PostLoadBalancerRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) { + rsp, err := c.PostLoadBalancerRulesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostLoadBalancerRulesResponse(rsp) +} + +func (c *ClientWithResponses) PostLoadBalancerRulesWithResponse(ctx context.Context, body PostLoadBalancerRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostLoadBalancerRulesResponse, error) { + rsp, err := c.PostLoadBalancerRules(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostLoadBalancerRulesResponse(rsp) +} + +// DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with arbitrary body returning *DeleteLoadBalancersRulesLoadBalancerRuleResponse +func (c *ClientWithResponses) DeleteLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) { + rsp, err := c.DeleteLoadBalancersRulesLoadBalancerRuleWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse(rsp) +} + +func (c *ClientWithResponses) DeleteLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body DeleteLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) { + rsp, err := c.DeleteLoadBalancersRulesLoadBalancerRule(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse(rsp) +} + +// GetLoadBalancersRulesLoadBalancerRuleWithResponse request returning *GetLoadBalancersRulesLoadBalancerRuleResponse +func (c *ClientWithResponses) GetLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, params *GetLoadBalancersRulesLoadBalancerRuleParams, reqEditors ...RequestEditorFn) (*GetLoadBalancersRulesLoadBalancerRuleResponse, error) { + rsp, err := c.GetLoadBalancersRulesLoadBalancerRule(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetLoadBalancersRulesLoadBalancerRuleResponse(rsp) +} + +// PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse request with arbitrary body returning *PatchLoadBalancersRulesLoadBalancerRuleResponse +func (c *ClientWithResponses) PatchLoadBalancersRulesLoadBalancerRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) { + rsp, err := c.PatchLoadBalancersRulesLoadBalancerRuleWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchLoadBalancersRulesLoadBalancerRuleResponse(rsp) +} + +func (c *ClientWithResponses) PatchLoadBalancersRulesLoadBalancerRuleWithResponse(ctx context.Context, body PatchLoadBalancersRulesLoadBalancerRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) { + rsp, err := c.PatchLoadBalancersRulesLoadBalancerRule(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchLoadBalancersRulesLoadBalancerRuleResponse(rsp) +} + +// GetNetworkWithResponse request returning *GetNetworkResponse +func (c *ClientWithResponses) GetNetworkWithResponse(ctx context.Context, params *GetNetworkParams, reqEditors ...RequestEditorFn) (*GetNetworkResponse, error) { + rsp, err := c.GetNetwork(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetNetworkResponse(rsp) +} + +// GetOperatingSystemsWithResponse request returning *GetOperatingSystemsResponse +func (c *ClientWithResponses) GetOperatingSystemsWithResponse(ctx context.Context, params *GetOperatingSystemsParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemsResponse, error) { + rsp, err := c.GetOperatingSystems(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOperatingSystemsResponse(rsp) +} + +// GetOperatingSystemWithResponse request returning *GetOperatingSystemResponse +func (c *ClientWithResponses) GetOperatingSystemWithResponse(ctx context.Context, params *GetOperatingSystemParams, reqEditors ...RequestEditorFn) (*GetOperatingSystemResponse, error) { + rsp, err := c.GetOperatingSystem(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOperatingSystemResponse(rsp) +} + +// GetOrganizationsWithResponse request returning *GetOrganizationsResponse +func (c *ClientWithResponses) GetOrganizationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetOrganizationsResponse, error) { + rsp, err := c.GetOrganizations(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationsResponse(rsp) +} + +// GetOrganizationWithResponse request returning *GetOrganizationResponse +func (c *ClientWithResponses) GetOrganizationWithResponse(ctx context.Context, params *GetOrganizationParams, reqEditors ...RequestEditorFn) (*GetOrganizationResponse, error) { + rsp, err := c.GetOrganization(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationResponse(rsp) +} + +// GetOrganizationAddressListsWithResponse request returning *GetOrganizationAddressListsResponse +func (c *ClientWithResponses) GetOrganizationAddressListsWithResponse(ctx context.Context, params *GetOrganizationAddressListsParams, reqEditors ...RequestEditorFn) (*GetOrganizationAddressListsResponse, error) { + rsp, err := c.GetOrganizationAddressLists(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationAddressListsResponse(rsp) +} + +// PostOrganizationAddressListsWithBodyWithResponse request with arbitrary body returning *PostOrganizationAddressListsResponse +func (c *ClientWithResponses) PostOrganizationAddressListsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationAddressListsResponse, error) { + rsp, err := c.PostOrganizationAddressListsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationAddressListsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationAddressListsWithResponse(ctx context.Context, body PostOrganizationAddressListsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationAddressListsResponse, error) { + rsp, err := c.PostOrganizationAddressLists(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationAddressListsResponse(rsp) +} + +// GetOrganizationAvailableNetworksWithResponse request returning *GetOrganizationAvailableNetworksResponse +func (c *ClientWithResponses) GetOrganizationAvailableNetworksWithResponse(ctx context.Context, params *GetOrganizationAvailableNetworksParams, reqEditors ...RequestEditorFn) (*GetOrganizationAvailableNetworksResponse, error) { + rsp, err := c.GetOrganizationAvailableNetworks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationAvailableNetworksResponse(rsp) +} + +// GetOrganizationCertificatesWithResponse request returning *GetOrganizationCertificatesResponse +func (c *ClientWithResponses) GetOrganizationCertificatesWithResponse(ctx context.Context, params *GetOrganizationCertificatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationCertificatesResponse, error) { + rsp, err := c.GetOrganizationCertificates(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationCertificatesResponse(rsp) +} + +// GetOrganizationDiskBackupPoliciesWithResponse request returning *GetOrganizationDiskBackupPoliciesResponse +func (c *ClientWithResponses) GetOrganizationDiskBackupPoliciesWithResponse(ctx context.Context, params *GetOrganizationDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskBackupPoliciesResponse, error) { + rsp, err := c.GetOrganizationDiskBackupPolicies(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationDiskBackupPoliciesResponse(rsp) +} + +// GetOrganizationDiskTemplatesWithResponse request returning *GetOrganizationDiskTemplatesResponse +func (c *ClientWithResponses) GetOrganizationDiskTemplatesWithResponse(ctx context.Context, params *GetOrganizationDiskTemplatesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDiskTemplatesResponse, error) { + rsp, err := c.GetOrganizationDiskTemplates(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationDiskTemplatesResponse(rsp) +} + +// GetOrganizationDisksWithResponse request returning *GetOrganizationDisksResponse +func (c *ClientWithResponses) GetOrganizationDisksWithResponse(ctx context.Context, params *GetOrganizationDisksParams, reqEditors ...RequestEditorFn) (*GetOrganizationDisksResponse, error) { + rsp, err := c.GetOrganizationDisks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationDisksResponse(rsp) +} + +// GetOrganizationDnsZonesWithResponse request returning *GetOrganizationDnsZonesResponse +func (c *ClientWithResponses) GetOrganizationDnsZonesWithResponse(ctx context.Context, params *GetOrganizationDnsZonesParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesResponse, error) { + rsp, err := c.GetOrganizationDnsZones(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationDnsZonesResponse(rsp) +} + +// PostOrganizationDnsZonesWithBodyWithResponse request with arbitrary body returning *PostOrganizationDnsZonesResponse +func (c *ClientWithResponses) PostOrganizationDnsZonesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) { + rsp, err := c.PostOrganizationDnsZonesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationDnsZonesResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationDnsZonesWithResponse(ctx context.Context, body PostOrganizationDnsZonesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationDnsZonesResponse, error) { + rsp, err := c.PostOrganizationDnsZones(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationDnsZonesResponse(rsp) +} + +// GetOrganizationDnsZonesNameserversWithResponse request returning *GetOrganizationDnsZonesNameserversResponse +func (c *ClientWithResponses) GetOrganizationDnsZonesNameserversWithResponse(ctx context.Context, params *GetOrganizationDnsZonesNameserversParams, reqEditors ...RequestEditorFn) (*GetOrganizationDnsZonesNameserversResponse, error) { + rsp, err := c.GetOrganizationDnsZonesNameservers(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationDnsZonesNameserversResponse(rsp) +} + +// GetOrganizationFileStorageVolumesWithResponse request returning *GetOrganizationFileStorageVolumesResponse +func (c *ClientWithResponses) GetOrganizationFileStorageVolumesWithResponse(ctx context.Context, params *GetOrganizationFileStorageVolumesParams, reqEditors ...RequestEditorFn) (*GetOrganizationFileStorageVolumesResponse, error) { + rsp, err := c.GetOrganizationFileStorageVolumes(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationFileStorageVolumesResponse(rsp) +} + +// PostOrganizationFileStorageVolumesWithBodyWithResponse request with arbitrary body returning *PostOrganizationFileStorageVolumesResponse +func (c *ClientWithResponses) PostOrganizationFileStorageVolumesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) { + rsp, err := c.PostOrganizationFileStorageVolumesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationFileStorageVolumesResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationFileStorageVolumesWithResponse(ctx context.Context, body PostOrganizationFileStorageVolumesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationFileStorageVolumesResponse, error) { + rsp, err := c.PostOrganizationFileStorageVolumes(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationFileStorageVolumesResponse(rsp) +} + +// GetOrganizationIpAddressesWithResponse request returning *GetOrganizationIpAddressesResponse +func (c *ClientWithResponses) GetOrganizationIpAddressesWithResponse(ctx context.Context, params *GetOrganizationIpAddressesParams, reqEditors ...RequestEditorFn) (*GetOrganizationIpAddressesResponse, error) { + rsp, err := c.GetOrganizationIpAddresses(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationIpAddressesResponse(rsp) +} + +// PostOrganizationIpAddressesWithBodyWithResponse request with arbitrary body returning *PostOrganizationIpAddressesResponse +func (c *ClientWithResponses) PostOrganizationIpAddressesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) { + rsp, err := c.PostOrganizationIpAddressesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationIpAddressesResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationIpAddressesWithResponse(ctx context.Context, body PostOrganizationIpAddressesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationIpAddressesResponse, error) { + rsp, err := c.PostOrganizationIpAddresses(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationIpAddressesResponse(rsp) +} + +// GetOrganizationLoadBalancersWithResponse request returning *GetOrganizationLoadBalancersResponse +func (c *ClientWithResponses) GetOrganizationLoadBalancersWithResponse(ctx context.Context, params *GetOrganizationLoadBalancersParams, reqEditors ...RequestEditorFn) (*GetOrganizationLoadBalancersResponse, error) { + rsp, err := c.GetOrganizationLoadBalancers(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationLoadBalancersResponse(rsp) +} + +// PostOrganizationLoadBalancersWithBodyWithResponse request with arbitrary body returning *PostOrganizationLoadBalancersResponse +func (c *ClientWithResponses) PostOrganizationLoadBalancersWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) { + rsp, err := c.PostOrganizationLoadBalancersWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationLoadBalancersResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationLoadBalancersWithResponse(ctx context.Context, body PostOrganizationLoadBalancersJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationLoadBalancersResponse, error) { + rsp, err := c.PostOrganizationLoadBalancers(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationLoadBalancersResponse(rsp) +} + +// GetOrganizationManagedWithResponse request returning *GetOrganizationManagedResponse +func (c *ClientWithResponses) GetOrganizationManagedWithResponse(ctx context.Context, params *GetOrganizationManagedParams, reqEditors ...RequestEditorFn) (*GetOrganizationManagedResponse, error) { + rsp, err := c.GetOrganizationManaged(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationManagedResponse(rsp) +} + +// PostOrganizationManagedWithBodyWithResponse request with arbitrary body returning *PostOrganizationManagedResponse +func (c *ClientWithResponses) PostOrganizationManagedWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) { + rsp, err := c.PostOrganizationManagedWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationManagedResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationManagedWithResponse(ctx context.Context, body PostOrganizationManagedJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationManagedResponse, error) { + rsp, err := c.PostOrganizationManaged(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationManagedResponse(rsp) +} + +// GetOrganizationNetworkSpeedProfilesWithResponse request returning *GetOrganizationNetworkSpeedProfilesResponse +func (c *ClientWithResponses) GetOrganizationNetworkSpeedProfilesWithResponse(ctx context.Context, params *GetOrganizationNetworkSpeedProfilesParams, reqEditors ...RequestEditorFn) (*GetOrganizationNetworkSpeedProfilesResponse, error) { + rsp, err := c.GetOrganizationNetworkSpeedProfiles(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationNetworkSpeedProfilesResponse(rsp) +} + +// GetOrganizationPolicyLimitsWithResponse request returning *GetOrganizationPolicyLimitsResponse +func (c *ClientWithResponses) GetOrganizationPolicyLimitsWithResponse(ctx context.Context, params *GetOrganizationPolicyLimitsParams, reqEditors ...RequestEditorFn) (*GetOrganizationPolicyLimitsResponse, error) { + rsp, err := c.GetOrganizationPolicyLimits(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationPolicyLimitsResponse(rsp) +} + +// GetOrganizationSecurityGroupsWithResponse request returning *GetOrganizationSecurityGroupsResponse +func (c *ClientWithResponses) GetOrganizationSecurityGroupsWithResponse(ctx context.Context, params *GetOrganizationSecurityGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationSecurityGroupsResponse, error) { + rsp, err := c.GetOrganizationSecurityGroups(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationSecurityGroupsResponse(rsp) +} + +// PostOrganizationSecurityGroupsWithBodyWithResponse request with arbitrary body returning *PostOrganizationSecurityGroupsResponse +func (c *ClientWithResponses) PostOrganizationSecurityGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) { + rsp, err := c.PostOrganizationSecurityGroupsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationSecurityGroupsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationSecurityGroupsWithResponse(ctx context.Context, body PostOrganizationSecurityGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSecurityGroupsResponse, error) { + rsp, err := c.PostOrganizationSecurityGroups(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationSecurityGroupsResponse(rsp) +} + +// GetOrganizationSshKeysWithResponse request returning *GetOrganizationSshKeysResponse +func (c *ClientWithResponses) GetOrganizationSshKeysWithResponse(ctx context.Context, params *GetOrganizationSshKeysParams, reqEditors ...RequestEditorFn) (*GetOrganizationSshKeysResponse, error) { + rsp, err := c.GetOrganizationSshKeys(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationSshKeysResponse(rsp) +} + +// PostOrganizationSshKeysWithBodyWithResponse request with arbitrary body returning *PostOrganizationSshKeysResponse +func (c *ClientWithResponses) PostOrganizationSshKeysWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) { + rsp, err := c.PostOrganizationSshKeysWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationSshKeysResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationSshKeysWithResponse(ctx context.Context, body PostOrganizationSshKeysJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationSshKeysResponse, error) { + rsp, err := c.PostOrganizationSshKeys(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationSshKeysResponse(rsp) +} + +// GetOrganizationTagsWithResponse request returning *GetOrganizationTagsResponse +func (c *ClientWithResponses) GetOrganizationTagsWithResponse(ctx context.Context, params *GetOrganizationTagsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTagsResponse, error) { + rsp, err := c.GetOrganizationTags(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationTagsResponse(rsp) +} + +// PostOrganizationTagsWithBodyWithResponse request with arbitrary body returning *PostOrganizationTagsResponse +func (c *ClientWithResponses) PostOrganizationTagsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) { + rsp, err := c.PostOrganizationTagsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationTagsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationTagsWithResponse(ctx context.Context, body PostOrganizationTagsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTagsResponse, error) { + rsp, err := c.PostOrganizationTags(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationTagsResponse(rsp) +} + +// GetOrganizationTrashObjectsWithResponse request returning *GetOrganizationTrashObjectsResponse +func (c *ClientWithResponses) GetOrganizationTrashObjectsWithResponse(ctx context.Context, params *GetOrganizationTrashObjectsParams, reqEditors ...RequestEditorFn) (*GetOrganizationTrashObjectsResponse, error) { + rsp, err := c.GetOrganizationTrashObjects(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationTrashObjectsResponse(rsp) +} + +// PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse request with arbitrary body returning *PostOrganizationTrashObjectsPurgeAllResponse +func (c *ClientWithResponses) PostOrganizationTrashObjectsPurgeAllWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) { + rsp, err := c.PostOrganizationTrashObjectsPurgeAllWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationTrashObjectsPurgeAllResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationTrashObjectsPurgeAllWithResponse(ctx context.Context, body PostOrganizationTrashObjectsPurgeAllJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationTrashObjectsPurgeAllResponse, error) { + rsp, err := c.PostOrganizationTrashObjectsPurgeAll(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationTrashObjectsPurgeAllResponse(rsp) +} + +// GetOrganizationUsersWithAccessWithResponse request returning *GetOrganizationUsersWithAccessResponse +func (c *ClientWithResponses) GetOrganizationUsersWithAccessWithResponse(ctx context.Context, params *GetOrganizationUsersWithAccessParams, reqEditors ...RequestEditorFn) (*GetOrganizationUsersWithAccessResponse, error) { + rsp, err := c.GetOrganizationUsersWithAccess(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationUsersWithAccessResponse(rsp) +} + +// GetOrganizationVirtualMachineGroupsWithResponse request returning *GetOrganizationVirtualMachineGroupsResponse +func (c *ClientWithResponses) GetOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, params *GetOrganizationVirtualMachineGroupsParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachineGroupsResponse, error) { + rsp, err := c.GetOrganizationVirtualMachineGroups(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationVirtualMachineGroupsResponse(rsp) +} + +// PostOrganizationVirtualMachineGroupsWithBodyWithResponse request with arbitrary body returning *PostOrganizationVirtualMachineGroupsResponse +func (c *ClientWithResponses) PostOrganizationVirtualMachineGroupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) { + rsp, err := c.PostOrganizationVirtualMachineGroupsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationVirtualMachineGroupsResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationVirtualMachineGroupsWithResponse(ctx context.Context, body PostOrganizationVirtualMachineGroupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachineGroupsResponse, error) { + rsp, err := c.PostOrganizationVirtualMachineGroups(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationVirtualMachineGroupsResponse(rsp) +} + +// GetOrganizationVirtualMachinesWithResponse request returning *GetOrganizationVirtualMachinesResponse +func (c *ClientWithResponses) GetOrganizationVirtualMachinesWithResponse(ctx context.Context, params *GetOrganizationVirtualMachinesParams, reqEditors ...RequestEditorFn) (*GetOrganizationVirtualMachinesResponse, error) { + rsp, err := c.GetOrganizationVirtualMachines(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetOrganizationVirtualMachinesResponse(rsp) +} + +// PostOrganizationVirtualMachinesBuildWithBodyWithResponse request with arbitrary body returning *PostOrganizationVirtualMachinesBuildResponse +func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) { + rsp, err := c.PostOrganizationVirtualMachinesBuildWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationVirtualMachinesBuildResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildResponse, error) { + rsp, err := c.PostOrganizationVirtualMachinesBuild(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationVirtualMachinesBuildResponse(rsp) +} + +// PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse request with arbitrary body returning *PostOrganizationVirtualMachinesBuildFromSpecResponse +func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildFromSpecWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) { + rsp, err := c.PostOrganizationVirtualMachinesBuildFromSpecWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationVirtualMachinesBuildFromSpecResponse(rsp) +} + +func (c *ClientWithResponses) PostOrganizationVirtualMachinesBuildFromSpecWithResponse(ctx context.Context, body PostOrganizationVirtualMachinesBuildFromSpecJSONRequestBody, reqEditors ...RequestEditorFn) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) { + rsp, err := c.PostOrganizationVirtualMachinesBuildFromSpec(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostOrganizationVirtualMachinesBuildFromSpecResponse(rsp) +} + +// DeleteSecurityGroupWithBodyWithResponse request with arbitrary body returning *DeleteSecurityGroupResponse +func (c *ClientWithResponses) DeleteSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) { + rsp, err := c.DeleteSecurityGroupWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSecurityGroupResponse(rsp) +} + +func (c *ClientWithResponses) DeleteSecurityGroupWithResponse(ctx context.Context, body DeleteSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupResponse, error) { + rsp, err := c.DeleteSecurityGroup(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSecurityGroupResponse(rsp) +} + +// GetSecurityGroupWithResponse request returning *GetSecurityGroupResponse +func (c *ClientWithResponses) GetSecurityGroupWithResponse(ctx context.Context, params *GetSecurityGroupParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupResponse, error) { + rsp, err := c.GetSecurityGroup(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSecurityGroupResponse(rsp) +} + +// PatchSecurityGroupWithBodyWithResponse request with arbitrary body returning *PatchSecurityGroupResponse +func (c *ClientWithResponses) PatchSecurityGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) { + rsp, err := c.PatchSecurityGroupWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchSecurityGroupResponse(rsp) +} + +func (c *ClientWithResponses) PatchSecurityGroupWithResponse(ctx context.Context, body PatchSecurityGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupResponse, error) { + rsp, err := c.PatchSecurityGroup(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchSecurityGroupResponse(rsp) +} + +// GetSecurityGroupRulesWithResponse request returning *GetSecurityGroupRulesResponse +func (c *ClientWithResponses) GetSecurityGroupRulesWithResponse(ctx context.Context, params *GetSecurityGroupRulesParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupRulesResponse, error) { + rsp, err := c.GetSecurityGroupRules(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSecurityGroupRulesResponse(rsp) +} + +// PostSecurityGroupRulesWithBodyWithResponse request with arbitrary body returning *PostSecurityGroupRulesResponse +func (c *ClientWithResponses) PostSecurityGroupRulesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) { + rsp, err := c.PostSecurityGroupRulesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostSecurityGroupRulesResponse(rsp) +} + +func (c *ClientWithResponses) PostSecurityGroupRulesWithResponse(ctx context.Context, body PostSecurityGroupRulesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSecurityGroupRulesResponse, error) { + rsp, err := c.PostSecurityGroupRules(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostSecurityGroupRulesResponse(rsp) +} + +// DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with arbitrary body returning *DeleteSecurityGroupsRulesSecurityGroupRuleResponse +func (c *ClientWithResponses) DeleteSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) { + rsp, err := c.DeleteSecurityGroupsRulesSecurityGroupRuleWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse(rsp) +} + +func (c *ClientWithResponses) DeleteSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body DeleteSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) { + rsp, err := c.DeleteSecurityGroupsRulesSecurityGroupRule(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse(rsp) +} + +// GetSecurityGroupsRulesSecurityGroupRuleWithResponse request returning *GetSecurityGroupsRulesSecurityGroupRuleResponse +func (c *ClientWithResponses) GetSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, params *GetSecurityGroupsRulesSecurityGroupRuleParams, reqEditors ...RequestEditorFn) (*GetSecurityGroupsRulesSecurityGroupRuleResponse, error) { + rsp, err := c.GetSecurityGroupsRulesSecurityGroupRule(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetSecurityGroupsRulesSecurityGroupRuleResponse(rsp) +} + +// PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse request with arbitrary body returning *PatchSecurityGroupsRulesSecurityGroupRuleResponse +func (c *ClientWithResponses) PatchSecurityGroupsRulesSecurityGroupRuleWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) { + rsp, err := c.PatchSecurityGroupsRulesSecurityGroupRuleWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse(rsp) +} + +func (c *ClientWithResponses) PatchSecurityGroupsRulesSecurityGroupRuleWithResponse(ctx context.Context, body PatchSecurityGroupsRulesSecurityGroupRuleJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) { + rsp, err := c.PatchSecurityGroupsRulesSecurityGroupRule(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse(rsp) +} + +// DeleteSshKeyWithBodyWithResponse request with arbitrary body returning *DeleteSshKeyResponse +func (c *ClientWithResponses) DeleteSshKeyWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) { + rsp, err := c.DeleteSshKeyWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSshKeyResponse(rsp) +} + +func (c *ClientWithResponses) DeleteSshKeyWithResponse(ctx context.Context, body DeleteSshKeyJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteSshKeyResponse, error) { + rsp, err := c.DeleteSshKey(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteSshKeyResponse(rsp) +} + +// DeleteTagWithBodyWithResponse request with arbitrary body returning *DeleteTagResponse +func (c *ClientWithResponses) DeleteTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) { + rsp, err := c.DeleteTagWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTagResponse(rsp) +} + +func (c *ClientWithResponses) DeleteTagWithResponse(ctx context.Context, body DeleteTagJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTagResponse, error) { + rsp, err := c.DeleteTag(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTagResponse(rsp) +} + +// GetTagWithResponse request returning *GetTagResponse +func (c *ClientWithResponses) GetTagWithResponse(ctx context.Context, params *GetTagParams, reqEditors ...RequestEditorFn) (*GetTagResponse, error) { + rsp, err := c.GetTag(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTagResponse(rsp) +} + +// PatchTagWithBodyWithResponse request with arbitrary body returning *PatchTagResponse +func (c *ClientWithResponses) PatchTagWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) { + rsp, err := c.PatchTagWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchTagResponse(rsp) +} + +func (c *ClientWithResponses) PatchTagWithResponse(ctx context.Context, body PatchTagJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchTagResponse, error) { + rsp, err := c.PatchTag(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchTagResponse(rsp) +} + +// GetTaskWithResponse request returning *GetTaskResponse +func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, params *GetTaskParams, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) { + rsp, err := c.GetTask(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTaskResponse(rsp) +} + +// DeleteTrashObjectWithBodyWithResponse request with arbitrary body returning *DeleteTrashObjectResponse +func (c *ClientWithResponses) DeleteTrashObjectWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) { + rsp, err := c.DeleteTrashObjectWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTrashObjectResponse(rsp) +} + +func (c *ClientWithResponses) DeleteTrashObjectWithResponse(ctx context.Context, body DeleteTrashObjectJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteTrashObjectResponse, error) { + rsp, err := c.DeleteTrashObject(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteTrashObjectResponse(rsp) +} + +// GetTrashObjectWithResponse request returning *GetTrashObjectResponse +func (c *ClientWithResponses) GetTrashObjectWithResponse(ctx context.Context, params *GetTrashObjectParams, reqEditors ...RequestEditorFn) (*GetTrashObjectResponse, error) { + rsp, err := c.GetTrashObject(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetTrashObjectResponse(rsp) +} + +// PostTrashObjectRestoreWithBodyWithResponse request with arbitrary body returning *PostTrashObjectRestoreResponse +func (c *ClientWithResponses) PostTrashObjectRestoreWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) { + rsp, err := c.PostTrashObjectRestoreWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostTrashObjectRestoreResponse(rsp) +} + +func (c *ClientWithResponses) PostTrashObjectRestoreWithResponse(ctx context.Context, body PostTrashObjectRestoreJSONRequestBody, reqEditors ...RequestEditorFn) (*PostTrashObjectRestoreResponse, error) { + rsp, err := c.PostTrashObjectRestore(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostTrashObjectRestoreResponse(rsp) +} + +// GetUsersCurrentWithResponse request returning *GetUsersCurrentResponse +func (c *ClientWithResponses) GetUsersCurrentWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetUsersCurrentResponse, error) { + rsp, err := c.GetUsersCurrent(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetUsersCurrentResponse(rsp) +} + +// GetVirtualMachineAuthorizedKeysWithResponse request returning *GetVirtualMachineAuthorizedKeysResponse +func (c *ClientWithResponses) GetVirtualMachineAuthorizedKeysWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetVirtualMachineAuthorizedKeysResponse, error) { + rsp, err := c.GetVirtualMachineAuthorizedKeys(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineAuthorizedKeysResponse(rsp) +} + +// DeleteVirtualMachineGroupWithBodyWithResponse request with arbitrary body returning *DeleteVirtualMachineGroupResponse +func (c *ClientWithResponses) DeleteVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) { + rsp, err := c.DeleteVirtualMachineGroupWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteVirtualMachineGroupResponse(rsp) +} + +func (c *ClientWithResponses) DeleteVirtualMachineGroupWithResponse(ctx context.Context, body DeleteVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineGroupResponse, error) { + rsp, err := c.DeleteVirtualMachineGroup(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteVirtualMachineGroupResponse(rsp) +} + +// GetVirtualMachineGroupWithResponse request returning *GetVirtualMachineGroupResponse +func (c *ClientWithResponses) GetVirtualMachineGroupWithResponse(ctx context.Context, params *GetVirtualMachineGroupParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineGroupResponse, error) { + rsp, err := c.GetVirtualMachineGroup(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineGroupResponse(rsp) +} + +// PatchVirtualMachineGroupWithBodyWithResponse request with arbitrary body returning *PatchVirtualMachineGroupResponse +func (c *ClientWithResponses) PatchVirtualMachineGroupWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) { + rsp, err := c.PatchVirtualMachineGroupWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchVirtualMachineGroupResponse(rsp) +} + +func (c *ClientWithResponses) PatchVirtualMachineGroupWithResponse(ctx context.Context, body PatchVirtualMachineGroupJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineGroupResponse, error) { + rsp, err := c.PatchVirtualMachineGroup(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchVirtualMachineGroupResponse(rsp) +} + +// GetVMNIVMNIWithResponse request returning *GetVMNIVMNIResponse +func (c *ClientWithResponses) GetVMNIVMNIWithResponse(ctx context.Context, params *GetVMNIVMNIParams, reqEditors ...RequestEditorFn) (*GetVMNIVMNIResponse, error) { + rsp, err := c.GetVMNIVMNI(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVMNIVMNIResponse(rsp) +} + +// PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineNetworkInterfaceAllocateIpResponse +func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) { + rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateIpWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) { + rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateIp(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse(rsp) +} + +// PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineNetworkInterfaceAllocateNewIpResponse +func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateNewIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) { + rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateNewIpWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineNetworkInterfaceAllocateNewIpWithResponse(ctx context.Context, body PostVirtualMachineNetworkInterfaceAllocateNewIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) { + rsp, err := c.PostVirtualMachineNetworkInterfaceAllocateNewIp(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse(rsp) +} + +// GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse request returning *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse +func (c *ClientWithResponses) GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse, error) { + rsp, err := c.GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersion(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse(rsp) +} + +// PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse request with arbitrary body returning *PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse +func (c *ClientWithResponses) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) { + rsp, err := c.PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse(rsp) +} + +func (c *ClientWithResponses) PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithResponse(ctx context.Context, body PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) { + rsp, err := c.PatchVirtualMachineNetworkInterfaceUpdateSpeedProfile(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse(rsp) +} + +// GetVirtualMachinePackagesWithResponse request returning *GetVirtualMachinePackagesResponse +func (c *ClientWithResponses) GetVirtualMachinePackagesWithResponse(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackagesResponse, error) { + rsp, err := c.GetVirtualMachinePackages(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachinePackagesResponse(rsp) +} + +// GetVirtualMachinePackageWithResponse request returning *GetVirtualMachinePackageResponse +func (c *ClientWithResponses) GetVirtualMachinePackageWithResponse(ctx context.Context, params *GetVirtualMachinePackageParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackageResponse, error) { + rsp, err := c.GetVirtualMachinePackage(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachinePackageResponse(rsp) +} + +// DeleteVirtualMachineWithBodyWithResponse request with arbitrary body returning *DeleteVirtualMachineResponse +func (c *ClientWithResponses) DeleteVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) { + rsp, err := c.DeleteVirtualMachineWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteVirtualMachineResponse(rsp) +} + +func (c *ClientWithResponses) DeleteVirtualMachineWithResponse(ctx context.Context, body DeleteVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*DeleteVirtualMachineResponse, error) { + rsp, err := c.DeleteVirtualMachine(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParseDeleteVirtualMachineResponse(rsp) +} + +// GetVirtualMachineWithResponse request returning *GetVirtualMachineResponse +func (c *ClientWithResponses) GetVirtualMachineWithResponse(ctx context.Context, params *GetVirtualMachineParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineResponse, error) { + rsp, err := c.GetVirtualMachine(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineResponse(rsp) +} + +// PatchVirtualMachineWithBodyWithResponse request with arbitrary body returning *PatchVirtualMachineResponse +func (c *ClientWithResponses) PatchVirtualMachineWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) { + rsp, err := c.PatchVirtualMachineWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchVirtualMachineResponse(rsp) +} + +func (c *ClientWithResponses) PatchVirtualMachineWithResponse(ctx context.Context, body PatchVirtualMachineJSONRequestBody, reqEditors ...RequestEditorFn) (*PatchVirtualMachineResponse, error) { + rsp, err := c.PatchVirtualMachine(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePatchVirtualMachineResponse(rsp) +} + +// PostVirtualMachineAllocateIpWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineAllocateIpResponse +func (c *ClientWithResponses) PostVirtualMachineAllocateIpWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) { + rsp, err := c.PostVirtualMachineAllocateIpWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineAllocateIpResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineAllocateIpWithResponse(ctx context.Context, body PostVirtualMachineAllocateIpJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineAllocateIpResponse, error) { + rsp, err := c.PostVirtualMachineAllocateIp(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineAllocateIpResponse(rsp) +} + +// PostVirtualMachineConsoleSessionsWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineConsoleSessionsResponse +func (c *ClientWithResponses) PostVirtualMachineConsoleSessionsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) { + rsp, err := c.PostVirtualMachineConsoleSessionsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineConsoleSessionsResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineConsoleSessionsWithResponse(ctx context.Context, body PostVirtualMachineConsoleSessionsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineConsoleSessionsResponse, error) { + rsp, err := c.PostVirtualMachineConsoleSessions(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineConsoleSessionsResponse(rsp) +} + +// GetVirtualMachineDiskBackupPoliciesWithResponse request returning *GetVirtualMachineDiskBackupPoliciesResponse +func (c *ClientWithResponses) GetVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, params *GetVirtualMachineDiskBackupPoliciesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDiskBackupPoliciesResponse, error) { + rsp, err := c.GetVirtualMachineDiskBackupPolicies(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineDiskBackupPoliciesResponse(rsp) +} + +// PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineDiskBackupPoliciesResponse +func (c *ClientWithResponses) PostVirtualMachineDiskBackupPoliciesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) { + rsp, err := c.PostVirtualMachineDiskBackupPoliciesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineDiskBackupPoliciesResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineDiskBackupPoliciesWithResponse(ctx context.Context, body PostVirtualMachineDiskBackupPoliciesJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineDiskBackupPoliciesResponse, error) { + rsp, err := c.PostVirtualMachineDiskBackupPolicies(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineDiskBackupPoliciesResponse(rsp) +} + +// GetVirtualMachineDisksWithResponse request returning *GetVirtualMachineDisksResponse +func (c *ClientWithResponses) GetVirtualMachineDisksWithResponse(ctx context.Context, params *GetVirtualMachineDisksParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineDisksResponse, error) { + rsp, err := c.GetVirtualMachineDisks(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineDisksResponse(rsp) +} + +// PutVirtualMachineFlexibleResourcesWithBodyWithResponse request with arbitrary body returning *PutVirtualMachineFlexibleResourcesResponse +func (c *ClientWithResponses) PutVirtualMachineFlexibleResourcesWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) { + rsp, err := c.PutVirtualMachineFlexibleResourcesWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutVirtualMachineFlexibleResourcesResponse(rsp) +} + +func (c *ClientWithResponses) PutVirtualMachineFlexibleResourcesWithResponse(ctx context.Context, body PutVirtualMachineFlexibleResourcesJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachineFlexibleResourcesResponse, error) { + rsp, err := c.PutVirtualMachineFlexibleResources(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutVirtualMachineFlexibleResourcesResponse(rsp) +} + +// GetVirtualMachineNetworkInterfacesWithResponse request returning *GetVirtualMachineNetworkInterfacesResponse +func (c *ClientWithResponses) GetVirtualMachineNetworkInterfacesWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfacesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfacesResponse, error) { + rsp, err := c.GetVirtualMachineNetworkInterfaces(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineNetworkInterfacesResponse(rsp) +} + +// GetVirtualMachineNetworkInterfaceWithResponse request returning *GetVirtualMachineNetworkInterfaceResponse +func (c *ClientWithResponses) GetVirtualMachineNetworkInterfaceWithResponse(ctx context.Context, params *GetVirtualMachineNetworkInterfaceParams, reqEditors ...RequestEditorFn) (*GetVirtualMachineNetworkInterfaceResponse, error) { + rsp, err := c.GetVirtualMachineNetworkInterface(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachineNetworkInterfaceResponse(rsp) +} + +// PutVirtualMachinePackageWithBodyWithResponse request with arbitrary body returning *PutVirtualMachinePackageResponse +func (c *ClientWithResponses) PutVirtualMachinePackageWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) { + rsp, err := c.PutVirtualMachinePackageWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutVirtualMachinePackageResponse(rsp) +} + +func (c *ClientWithResponses) PutVirtualMachinePackageWithResponse(ctx context.Context, body PutVirtualMachinePackageJSONRequestBody, reqEditors ...RequestEditorFn) (*PutVirtualMachinePackageResponse, error) { + rsp, err := c.PutVirtualMachinePackage(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePutVirtualMachinePackageResponse(rsp) +} + +// PostVirtualMachineResetWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineResetResponse +func (c *ClientWithResponses) PostVirtualMachineResetWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) { + rsp, err := c.PostVirtualMachineResetWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineResetResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineResetWithResponse(ctx context.Context, body PostVirtualMachineResetJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineResetResponse, error) { + rsp, err := c.PostVirtualMachineReset(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineResetResponse(rsp) +} + +// PostVirtualMachineShutdownWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineShutdownResponse +func (c *ClientWithResponses) PostVirtualMachineShutdownWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) { + rsp, err := c.PostVirtualMachineShutdownWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineShutdownResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineShutdownWithResponse(ctx context.Context, body PostVirtualMachineShutdownJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineShutdownResponse, error) { + rsp, err := c.PostVirtualMachineShutdown(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineShutdownResponse(rsp) +} + +// PostVirtualMachineStartWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineStartResponse +func (c *ClientWithResponses) PostVirtualMachineStartWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) { + rsp, err := c.PostVirtualMachineStartWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineStartResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineStartWithResponse(ctx context.Context, body PostVirtualMachineStartJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStartResponse, error) { + rsp, err := c.PostVirtualMachineStart(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineStartResponse(rsp) +} + +// PostVirtualMachineStopWithBodyWithResponse request with arbitrary body returning *PostVirtualMachineStopResponse +func (c *ClientWithResponses) PostVirtualMachineStopWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) { + rsp, err := c.PostVirtualMachineStopWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineStopResponse(rsp) +} + +func (c *ClientWithResponses) PostVirtualMachineStopWithResponse(ctx context.Context, body PostVirtualMachineStopJSONRequestBody, reqEditors ...RequestEditorFn) (*PostVirtualMachineStopResponse, error) { + rsp, err := c.PostVirtualMachineStop(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostVirtualMachineStopResponse(rsp) +} + +// GetVirtualMachinesBuildsVirtualMachineBuildWithResponse request returning *GetVirtualMachinesBuildsVirtualMachineBuildResponse +func (c *ClientWithResponses) GetVirtualMachinesBuildsVirtualMachineBuildWithResponse(ctx context.Context, params *GetVirtualMachinesBuildsVirtualMachineBuildParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinesBuildsVirtualMachineBuildResponse, error) { + rsp, err := c.GetVirtualMachinesBuildsVirtualMachineBuild(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachinesBuildsVirtualMachineBuildResponse(rsp) +} + +// GetZonesWithResponse request returning *GetZonesResponse +func (c *ClientWithResponses) GetZonesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetZonesResponse, error) { + rsp, err := c.GetZones(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetZonesResponse(rsp) +} + +// GetZoneWithResponse request returning *GetZoneResponse +func (c *ClientWithResponses) GetZoneWithResponse(ctx context.Context, params *GetZoneParams, reqEditors ...RequestEditorFn) (*GetZoneResponse, error) { + rsp, err := c.GetZone(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetZoneResponse(rsp) +} + +// ParseDeleteAddressListEntryResponse parses an HTTP response from a DeleteAddressListEntryWithResponse call +func ParseDeleteAddressListEntryResponse(rsp *http.Response) (*DeleteAddressListEntryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAddressListEntryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressListEntry The address list entry that has been destroyed. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListEntryNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetAddressListEntryResponse parses an HTTP response from a GetAddressListEntryWithResponse call +func ParseGetAddressListEntryResponse(rsp *http.Response) (*GetAddressListEntryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddressListEntryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressListEntry The address list entry. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListEntryNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchAddressListEntryResponse parses an HTTP response from a PatchAddressListEntryWithResponse call +func ParsePatchAddressListEntryResponse(rsp *http.Response) (*PatchAddressListEntryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchAddressListEntryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressListEntry The address list entry. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListEntryNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetAddressListsResponse parses an HTTP response from a GetAddressListsWithResponse call +func ParseGetAddressListsResponse(rsp *http.Response) (*GetAddressListsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddressListsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressLists A list of all global address lists. + AddressLists []GetAddressLists200ResponseAddressLists `json:"address_lists"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteAddressListResponse parses an HTTP response from a DeleteAddressListWithResponse call +func ParseDeleteAddressListResponse(rsp *http.Response) (*DeleteAddressListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteAddressListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressList The address list that has been destroyed. + AddressList AddressList `json:"address_list"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetAddressListResponse parses an HTTP response from a GetAddressListWithResponse call +func ParseGetAddressListResponse(rsp *http.Response) (*GetAddressListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddressListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressList The address list. + AddressList AddressList `json:"address_list"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchAddressListResponse parses an HTTP response from a PatchAddressListWithResponse call +func ParsePatchAddressListResponse(rsp *http.Response) (*PatchAddressListResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchAddressListResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressList The address list. + AddressList AddressList `json:"address_list"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetAddressListEntriesResponse parses an HTTP response from a GetAddressListEntriesWithResponse call +func ParseGetAddressListEntriesResponse(rsp *http.Response) (*GetAddressListEntriesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetAddressListEntriesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressListEntries A list of all address list entries for the given address list. + AddressListEntries []AddressListEntry `json:"address_list_entries"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostAddressListEntriesResponse parses an HTTP response from a PostAddressListEntriesWithResponse call +func ParsePostAddressListEntriesResponse(rsp *http.Response) (*PostAddressListEntriesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostAddressListEntriesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // AddressListEntry The address list entry. + AddressListEntry AddressListEntry `json:"address_list_entry"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest AddressListNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetCertificateResponse parses an HTTP response from a GetCertificateWithResponse call +func ParseGetCertificateResponse(rsp *http.Response) (*GetCertificateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCertificateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Certificate []Certificate `json:"certificate"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest CertificateNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetCountriesResponse parses an HTTP response from a GetCountriesWithResponse call +func ParseGetCountriesResponse(rsp *http.Response) (*GetCountriesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCountriesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Countries The list of countries + Countries []GetCountries200ResponseCountries `json:"countries"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetCountryResponse parses an HTTP response from a GetCountryWithResponse call +func ParseGetCountryResponse(rsp *http.Response) (*GetCountryResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCountryResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Country The country details + Country Country `json:"country"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest CountryNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetCountryCountryStatesResponse parses an HTTP response from a GetCountryCountryStatesWithResponse call +func ParseGetCountryCountryStatesResponse(rsp *http.Response) (*GetCountryCountryStatesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCountryCountryStatesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // CountryStates The list of country states for the given country + CountryStates []GetCountryCountryStates200ResponseCountryStates `json:"country_states"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest CountryNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetCountryStateResponse parses an HTTP response from a GetCountryStateWithResponse call +func ParseGetCountryStateResponse(rsp *http.Response) (*GetCountryStateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCountryStateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // CountryState The country state details + CountryState CountryState `json:"country_state"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest CountryStateNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetCurrenciesResponse parses an HTTP response from a GetCurrenciesWithResponse call +func ParseGetCurrenciesResponse(rsp *http.Response) (*GetCurrenciesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCurrenciesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Currencies The list of currencies + Currencies []GetCurrencies200ResponseCurrencies `json:"currencies"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetCurrencyResponse parses an HTTP response from a GetCurrencyWithResponse call +func ParseGetCurrencyResponse(rsp *http.Response) (*GetCurrencyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetCurrencyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Currency The currency details + Currency Currency `json:"currency"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest CurrencyNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDataCentersResponse parses an HTTP response from a GetDataCentersWithResponse call +func ParseGetDataCentersResponse(rsp *http.Response) (*GetDataCentersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDataCentersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + DataCenters []GetDataCenters200ResponseDataCenters `json:"data_centers"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDataCenterResponse parses an HTTP response from a GetDataCenterWithResponse call +func ParseGetDataCenterResponse(rsp *http.Response) (*GetDataCenterResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDataCenterResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + DataCenter GetDataCenter200ResponseDataCenter `json:"data_center"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DataCenterNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDataCenterDefaultNetworkResponse parses an HTTP response from a GetDataCenterDefaultNetworkWithResponse call +func ParseGetDataCenterDefaultNetworkResponse(rsp *http.Response) (*GetDataCenterDefaultNetworkResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDataCenterDefaultNetworkResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Network The details for the requested network + Network GetDataCenterDefaultNetwork200ResponseNetwork `json:"network"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DataCenterNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDataCenterGpuTypesResponse parses an HTTP response from a GetDataCenterGpuTypesWithResponse call +func ParseGetDataCenterGpuTypesResponse(rsp *http.Response) (*GetDataCenterGpuTypesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDataCenterGpuTypesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + GpuTypes []GetDataCenterGPUTypes200ResponseGPUTypes `json:"gpu_types"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DataCenterNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteDiskBackupPolicyResponse parses an HTTP response from a DeleteDiskBackupPolicyWithResponse call +func ParseDeleteDiskBackupPolicyResponse(rsp *http.Response) (*DeleteDiskBackupPolicyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteDiskBackupPolicyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicy The disk backup policy that has been destroyed + DiskBackupPolicy DeleteDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskBackupPolicyNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDiskBackupPolicyResponse parses an HTTP response from a GetDiskBackupPolicyWithResponse call +func ParseGetDiskBackupPolicyResponse(rsp *http.Response) (*GetDiskBackupPolicyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiskBackupPolicyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicy The located disk backup policy + DiskBackupPolicy GetDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskBackupPolicyNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchDiskBackupPolicyResponse parses an HTTP response from a PatchDiskBackupPolicyWithResponse call +func ParsePatchDiskBackupPolicyResponse(rsp *http.Response) (*PatchDiskBackupPolicyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchDiskBackupPolicyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicy The disk backup policy that has been updated + DiskBackupPolicy PatchDiskBackupPolicy200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskBackupPolicyNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteDiskBackupPolicyScheduleResponse parses an HTTP response from a DeleteDiskBackupPolicyScheduleWithResponse call +func ParseDeleteDiskBackupPolicyScheduleResponse(rsp *http.Response) (*DeleteDiskBackupPolicyScheduleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteDiskBackupPolicyScheduleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicy The disk backup policy that has been scheduled for deletion + DiskBackupPolicy DeleteDiskBackupPolicySchedule200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest InvalidTimestamp400Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskBackupPolicyNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDiskTemplateVersionResponse parses an HTTP response from a GetDiskTemplateVersionWithResponse call +func ParseGetDiskTemplateVersionResponse(rsp *http.Response) (*GetDiskTemplateVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiskTemplateVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskTemplateVersion The disk template version details + DiskTemplateVersion GetDiskTemplateVersion200ResponseDiskTemplateVersion `json:"disk_template_version"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskTemplateVersionNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDiskTemplateVersionSpecResponse parses an HTTP response from a GetDiskTemplateVersionSpecWithResponse call +func ParseGetDiskTemplateVersionSpecResponse(rsp *http.Response) (*GetDiskTemplateVersionSpecResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiskTemplateVersionSpecResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskTemplateVersion The disk template version details + DiskTemplateVersion GetDiskTemplateVersionSpec200ResponseDiskTemplateVersion `json:"disk_template_version"` + Spec TemplateSpec `json:"spec"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskTemplateVersionNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDiskTemplateResponse parses an HTTP response from a GetDiskTemplateWithResponse call +func ParseGetDiskTemplateResponse(rsp *http.Response) (*GetDiskTemplateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiskTemplateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskTemplate The disk template details + DiskTemplate GetDiskTemplate200ResponseDiskTemplate `json:"disk_template"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskTemplateNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDiskTemplateVersionsResponse parses an HTTP response from a GetDiskTemplateVersionsWithResponse call +func ParseGetDiskTemplateVersionsResponse(rsp *http.Response) (*GetDiskTemplateVersionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiskTemplateVersionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + DiskTemplate GetDiskTemplateVersions200ResponseDiskTemplate `json:"disk_template"` + + // DiskTemplateVersions The disk template versions for the provided template + DiskTemplateVersions []GetDiskTemplateVersions200ResponseDiskTemplateVersions `json:"disk_template_versions"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskTemplateNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDiskResponse parses an HTTP response from a GetDiskWithResponse call +func ParseGetDiskResponse(rsp *http.Response) (*GetDiskResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiskResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Disk The disk details + Disk GetDisk200ResponseDisk `json:"disk"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDiskDiskBackupPoliciesResponse parses an HTTP response from a GetDiskDiskBackupPoliciesWithResponse call +func ParseGetDiskDiskBackupPoliciesResponse(rsp *http.Response) (*GetDiskDiskBackupPoliciesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDiskDiskBackupPoliciesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicies The disk backup policies for the provided disk + DiskBackupPolicies []GetDiskDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostDiskDiskBackupPoliciesResponse parses an HTTP response from a PostDiskDiskBackupPoliciesWithResponse call +func ParsePostDiskDiskBackupPoliciesResponse(rsp *http.Response) (*PostDiskDiskBackupPoliciesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostDiskDiskBackupPoliciesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicy The new disk backup policy that has been created + DiskBackupPolicy PostDiskDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DiskNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteDnsRecordResponse parses an HTTP response from a DeleteDnsRecordWithResponse call +func ParseDeleteDnsRecordResponse(rsp *http.Response) (*DeleteDnsRecordResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteDnsRecordResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Deleted bool `json:"deleted"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSRecordNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDnsRecordResponse parses an HTTP response from a GetDnsRecordWithResponse call +func ParseGetDnsRecordResponse(rsp *http.Response) (*GetDnsRecordResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDnsRecordResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DnsRecord The DNS record for the provided organization + DnsRecord DNSRecord `json:"dns_record"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSRecordNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchDnsRecordResponse parses an HTTP response from a PatchDnsRecordWithResponse call +func ParsePatchDnsRecordResponse(rsp *http.Response) (*PatchDnsRecordResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchDnsRecordResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DnsRecord The DNS record that has been updated + DnsRecord DNSRecord `json:"dns_record"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSRecordNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteDnsZoneResponse parses an HTTP response from a DeleteDnsZoneWithResponse call +func ParseDeleteDnsZoneResponse(rsp *http.Response) (*DeleteDnsZoneResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteDnsZoneResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Deleted bool `json:"deleted"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSZoneNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDnsZoneResponse parses an HTTP response from a GetDnsZoneWithResponse call +func ParseGetDnsZoneResponse(rsp *http.Response) (*GetDnsZoneResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDnsZoneResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DnsZone The DNS zones for the provided organization + DnsZone DNSZone `json:"dns_zone"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSZoneNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchDnsZoneResponse parses an HTTP response from a PatchDnsZoneWithResponse call +func ParsePatchDnsZoneResponse(rsp *http.Response) (*PatchDnsZoneResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchDnsZoneResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DnsZone The DNS zones for the provided organization + DnsZone DNSZone `json:"dns_zone"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSZoneNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetDnsZoneRecordsResponse parses an HTTP response from a GetDnsZoneRecordsWithResponse call +func ParseGetDnsZoneRecordsResponse(rsp *http.Response) (*GetDnsZoneRecordsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDnsZoneRecordsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DnsRecords The DNS record for the provided zone + DnsRecords []DNSRecord `json:"dns_records"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSZoneNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostDnsZoneRecordsResponse parses an HTTP response from a PostDnsZoneRecordsWithResponse call +func ParsePostDnsZoneRecordsResponse(rsp *http.Response) (*PostDnsZoneRecordsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostDnsZoneRecordsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + DnsRecord DNSRecord `json:"dns_record"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSZoneNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostDnsZoneVerifyResponse parses an HTTP response from a PostDnsZoneVerifyWithResponse call +func ParsePostDnsZoneVerifyResponse(rsp *http.Response) (*PostDnsZoneVerifyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostDnsZoneVerifyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DnsZone The DNS zones for the provided organization + DnsZone DNSZone `json:"dns_zone"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DNSZoneNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest DNSZoneNotVerifiedResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteFileStorageVolumeResponse parses an HTTP response from a DeleteFileStorageVolumeWithResponse call +func ParseDeleteFileStorageVolumeResponse(rsp *http.Response) (*DeleteFileStorageVolumeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteFileStorageVolumeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // FileStorageVolume The file storage volume that has been destroyed. + FileStorageVolume DeleteFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` + TrashObject TrashObject `json:"trash_object"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest FileStorageVolumeNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetFileStorageVolumeResponse parses an HTTP response from a GetFileStorageVolumeWithResponse call +func ParseGetFileStorageVolumeResponse(rsp *http.Response) (*GetFileStorageVolumeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetFileStorageVolumeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // FileStorageVolume The file storage volume. + FileStorageVolume GetFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest FileStorageVolumeNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchFileStorageVolumeResponse parses an HTTP response from a PatchFileStorageVolumeWithResponse call +func ParsePatchFileStorageVolumeResponse(rsp *http.Response) (*PatchFileStorageVolumeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchFileStorageVolumeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // FileStorageVolume The file storage volume. + FileStorageVolume PatchFileStorageVolume200ResponseFileStorageVolume `json:"file_storage_volume"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest FileStorageVolumeNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetGpuTypesResponse parses an HTTP response from a GetGpuTypesWithResponse call +func ParseGetGpuTypesResponse(rsp *http.Response) (*GetGpuTypesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetGpuTypesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + GpuTypes []GetGPUTypes200ResponseGPUTypes `json:"gpu_types"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetGpuTypeResponse parses an HTTP response from a GetGpuTypeWithResponse call +func ParseGetGpuTypeResponse(rsp *http.Response) (*GetGpuTypeResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetGpuTypeResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + GpuType GetGPUType200ResponseGPUType `json:"gpu_type"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest GPUTypeNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostInvalidateLinkedWebSessionResponse parses an HTTP response from a PostInvalidateLinkedWebSessionWithResponse call +func ParsePostInvalidateLinkedWebSessionResponse(rsp *http.Response) (*PostInvalidateLinkedWebSessionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostInvalidateLinkedWebSessionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Status bool `json:"status"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest IdentityNotLinkedToWebSession400Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteIpAddressResponse parses an HTTP response from a DeleteIpAddressWithResponse call +func ParseDeleteIpAddressResponse(rsp *http.Response) (*DeleteIpAddressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteIpAddressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest IPAddressNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ResourceDoesNotSupportUnallocationResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetIpAddressResponse parses an HTTP response from a GetIpAddressWithResponse call +func ParseGetIpAddressResponse(rsp *http.Response) (*GetIpAddressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetIpAddressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Allocation The resource this address is allocated to + Allocation *GetIPAddress200ResponseAllocation `json:"allocation"` + + // IpAddress The IP address that has been located + IpAddress IPAddress `json:"ip_address"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest IPAddressNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchIpAddressResponse parses an HTTP response from a PatchIpAddressWithResponse call +func ParsePatchIpAddressResponse(rsp *http.Response) (*PatchIpAddressResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchIpAddressResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // IpAddress The IP address that has been updated + IpAddress IPAddress `json:"ip_address"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest IPAddressNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostIpAddressUnallocateResponse parses an HTTP response from a PostIpAddressUnallocateWithResponse call +func ParsePostIpAddressUnallocateResponse(rsp *http.Response) (*PostIpAddressUnallocateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostIpAddressUnallocateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest interface{} + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest IPAddressNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest ResourceDoesNotSupportUnallocationResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest NoAllocationResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteLoadBalancerResponse parses an HTTP response from a DeleteLoadBalancerWithResponse call +func ParseDeleteLoadBalancerResponse(rsp *http.Response) (*DeleteLoadBalancerResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteLoadBalancerResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancer The load balancer that has been destroyed + LoadBalancer DeleteLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetLoadBalancerResponse parses an HTTP response from a GetLoadBalancerWithResponse call +func ParseGetLoadBalancerResponse(rsp *http.Response) (*GetLoadBalancerResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetLoadBalancerResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancer The load balancer + LoadBalancer GetLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchLoadBalancerResponse parses an HTTP response from a PatchLoadBalancerWithResponse call +func ParsePatchLoadBalancerResponse(rsp *http.Response) (*PatchLoadBalancerResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchLoadBalancerResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancer The load balancer that has been updated + LoadBalancer PatchLoadBalancer200ResponseLoadBalancer `json:"load_balancer"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetLoadBalancerRulesResponse parses an HTTP response from a GetLoadBalancerRulesWithResponse call +func ParseGetLoadBalancerRulesResponse(rsp *http.Response) (*GetLoadBalancerRulesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetLoadBalancerRulesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancerRules The load balancer rules for this load balancer + LoadBalancerRules []GetLoadBalancerRules200ResponseLoadBalancerRules `json:"load_balancer_rules"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostLoadBalancerRulesResponse parses an HTTP response from a PostLoadBalancerRulesWithResponse call +func ParsePostLoadBalancerRulesResponse(rsp *http.Response) (*PostLoadBalancerRulesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostLoadBalancerRulesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancerRule The load balancer rule that has been created + LoadBalancerRule PostLoadBalancerRules200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse parses an HTTP response from a DeleteLoadBalancersRulesLoadBalancerRuleWithResponse call +func ParseDeleteLoadBalancersRulesLoadBalancerRuleResponse(rsp *http.Response) (*DeleteLoadBalancersRulesLoadBalancerRuleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteLoadBalancersRulesLoadBalancerRuleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancerRule The load balancer rule that has been destroyed + LoadBalancerRule DeleteLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerRuleNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetLoadBalancersRulesLoadBalancerRuleResponse parses an HTTP response from a GetLoadBalancersRulesLoadBalancerRuleWithResponse call +func ParseGetLoadBalancersRulesLoadBalancerRuleResponse(rsp *http.Response) (*GetLoadBalancersRulesLoadBalancerRuleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetLoadBalancersRulesLoadBalancerRuleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancerRule The resolved load balancer rule + LoadBalancerRule GetLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerRuleNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchLoadBalancersRulesLoadBalancerRuleResponse parses an HTTP response from a PatchLoadBalancersRulesLoadBalancerRuleWithResponse call +func ParsePatchLoadBalancersRulesLoadBalancerRuleResponse(rsp *http.Response) (*PatchLoadBalancersRulesLoadBalancerRuleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchLoadBalancersRulesLoadBalancerRuleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancerRule The load balancer that has been updated + LoadBalancerRule PatchLoadBalancersRulesLoadBalancerRule200ResponseLoadBalancerRule `json:"load_balancer_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest LoadBalancerRuleNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetNetworkResponse parses an HTTP response from a GetNetworkWithResponse call +func ParseGetNetworkResponse(rsp *http.Response) (*GetNetworkResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetNetworkResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Network The details for the requested network + Network Network `json:"network"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NetworkNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOperatingSystemsResponse parses an HTTP response from a GetOperatingSystemsWithResponse call +func ParseGetOperatingSystemsResponse(rsp *http.Response) (*GetOperatingSystemsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOperatingSystemsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // OperatingSystems The list of available operating systems + OperatingSystems []GetOperatingSystems200ResponseOperatingSystems `json:"operating_systems"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOperatingSystemResponse parses an HTTP response from a GetOperatingSystemWithResponse call +func ParseGetOperatingSystemResponse(rsp *http.Response) (*GetOperatingSystemResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOperatingSystemResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // OperatingSystem The operating system details + OperatingSystem OperatingSystem `json:"operating_system"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OperatingSystemNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationsResponse parses an HTTP response from a GetOrganizationsWithResponse call +func ParseGetOrganizationsResponse(rsp *http.Response) (*GetOrganizationsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Organizations []GetOrganizations200ResponseOrganizations `json:"organizations"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationResponse parses an HTTP response from a GetOrganizationWithResponse call +func ParseGetOrganizationResponse(rsp *http.Response) (*GetOrganizationResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Organization Organization `json:"organization"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationAddressListsResponse parses an HTTP response from a GetOrganizationAddressListsWithResponse call +func ParseGetOrganizationAddressListsResponse(rsp *http.Response) (*GetOrganizationAddressListsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationAddressListsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // AddressLists A list of all address lists for the given organization. + AddressLists []GetOrganizationAddressLists200ResponseAddressLists `json:"address_lists"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationAddressListsResponse parses an HTTP response from a PostOrganizationAddressListsWithResponse call +func ParsePostOrganizationAddressListsResponse(rsp *http.Response) (*PostOrganizationAddressListsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationAddressListsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // AddressList The address list. + AddressList AddressList `json:"address_list"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationAvailableNetworksResponse parses an HTTP response from a GetOrganizationAvailableNetworksWithResponse call +func ParseGetOrganizationAvailableNetworksResponse(rsp *http.Response) (*GetOrganizationAvailableNetworksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationAvailableNetworksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Networks []GetOrganizationAvailableNetworks200ResponseNetworks `json:"networks"` + VirtualNetworks []GetOrganizationAvailableNetworks200ResponseVirtualNetworks `json:"virtual_networks"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationCertificatesResponse parses an HTTP response from a GetOrganizationCertificatesWithResponse call +func ParseGetOrganizationCertificatesResponse(rsp *http.Response) (*GetOrganizationCertificatesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationCertificatesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Certificates []GetOrganizationCertificates200ResponseCertificates `json:"certificates"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationDiskBackupPoliciesResponse parses an HTTP response from a GetOrganizationDiskBackupPoliciesWithResponse call +func ParseGetOrganizationDiskBackupPoliciesResponse(rsp *http.Response) (*GetOrganizationDiskBackupPoliciesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationDiskBackupPoliciesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicies The disk backup policies for the provided organization + DiskBackupPolicies []GetOrganizationDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationDiskTemplatesResponse parses an HTTP response from a GetOrganizationDiskTemplatesWithResponse call +func ParseGetOrganizationDiskTemplatesResponse(rsp *http.Response) (*GetOrganizationDiskTemplatesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationDiskTemplatesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskTemplates The list of disk templates + DiskTemplates []GetOrganizationDiskTemplates200ResponseDiskTemplates `json:"disk_templates"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OperatingSystemNotFoundOrganizationNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationDisksResponse parses an HTTP response from a GetOrganizationDisksWithResponse call +func ParseGetOrganizationDisksResponse(rsp *http.Response) (*GetOrganizationDisksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationDisksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Disk The list of disks + Disk []GetOrganizationDisks200ResponseDisk `json:"disk"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationDnsZonesResponse parses an HTTP response from a GetOrganizationDnsZonesWithResponse call +func ParseGetOrganizationDnsZonesResponse(rsp *http.Response) (*GetOrganizationDnsZonesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationDnsZonesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DnsZones The DNS zones for the provided organization + DnsZones []DNSZone `json:"dns_zones"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationDnsZonesResponse parses an HTTP response from a PostOrganizationDnsZonesWithResponse call +func ParsePostOrganizationDnsZonesResponse(rsp *http.Response) (*PostOrganizationDnsZonesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationDnsZonesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // DnsZone The new DNS zone that has been created + DnsZone DNSZone `json:"dns_zone"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationDnsZonesNameserversResponse parses an HTTP response from a GetOrganizationDnsZonesNameserversWithResponse call +func ParseGetOrganizationDnsZonesNameserversResponse(rsp *http.Response) (*GetOrganizationDnsZonesNameserversResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationDnsZonesNameserversResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Nameservers []string `json:"nameservers"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationFileStorageVolumesResponse parses an HTTP response from a GetOrganizationFileStorageVolumesWithResponse call +func ParseGetOrganizationFileStorageVolumesResponse(rsp *http.Response) (*GetOrganizationFileStorageVolumesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationFileStorageVolumesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // FileStorageVolumes A list of all file storage volumes for the given organization. + FileStorageVolumes []GetOrganizationFileStorageVolumes200ResponseFileStorageVolumes `json:"file_storage_volumes"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationFileStorageVolumesResponse parses an HTTP response from a PostOrganizationFileStorageVolumesWithResponse call +func ParsePostOrganizationFileStorageVolumesResponse(rsp *http.Response) (*PostOrganizationFileStorageVolumesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationFileStorageVolumesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // FileStorageVolume The file storage volume. + FileStorageVolume PostOrganizationFileStorageVolumes201ResponseFileStorageVolume `json:"file_storage_volume"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationIpAddressesResponse parses an HTTP response from a GetOrganizationIpAddressesWithResponse call +func ParseGetOrganizationIpAddressesResponse(rsp *http.Response) (*GetOrganizationIpAddressesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationIpAddressesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // IpAddresses The IP addresses belonging to this organization + IpAddresses []GetOrganizationIPAddresses200ResponseIPAddresses `json:"ip_addresses"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationIpAddressesResponse parses an HTTP response from a PostOrganizationIpAddressesWithResponse call +func ParsePostOrganizationIpAddressesResponse(rsp *http.Response) (*PostOrganizationIpAddressesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationIpAddressesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // IpAddress The newly allocated IP address + IpAddress IPAddress `json:"ip_address"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NetworkNotFoundOrganizationNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest NoAvailableAddressesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationLoadBalancersResponse parses an HTTP response from a GetOrganizationLoadBalancersWithResponse call +func ParseGetOrganizationLoadBalancersResponse(rsp *http.Response) (*GetOrganizationLoadBalancersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationLoadBalancersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancers The load balancers owned by this organization + LoadBalancers []GetOrganizationLoadBalancers200ResponseLoadBalancers `json:"load_balancers"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationLoadBalancersResponse parses an HTTP response from a PostOrganizationLoadBalancersWithResponse call +func ParsePostOrganizationLoadBalancersResponse(rsp *http.Response) (*PostOrganizationLoadBalancersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationLoadBalancersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // LoadBalancer The load balancer that has been created + LoadBalancer PostOrganizationLoadBalancers200ResponseLoadBalancer `json:"load_balancer"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationManagedResponse parses an HTTP response from a GetOrganizationManagedWithResponse call +func ParseGetOrganizationManagedResponse(rsp *http.Response) (*GetOrganizationManagedResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationManagedResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Organizations []GetOrganizationManaged200ResponseOrganizations `json:"organizations"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationManagedResponse parses an HTTP response from a PostOrganizationManagedWithResponse call +func ParsePostOrganizationManagedResponse(rsp *http.Response) (*PostOrganizationManagedResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationManagedResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + Organization Organization `json:"organization"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest OrganizationLimitReachedValidationError422Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationNetworkSpeedProfilesResponse parses an HTTP response from a GetOrganizationNetworkSpeedProfilesWithResponse call +func ParseGetOrganizationNetworkSpeedProfilesResponse(rsp *http.Response) (*GetOrganizationNetworkSpeedProfilesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationNetworkSpeedProfilesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // NetworkSpeedProfiles The network speed profiles available to this organization + NetworkSpeedProfiles []NetworkSpeedProfile `json:"network_speed_profiles"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationPolicyLimitsResponse parses an HTTP response from a GetOrganizationPolicyLimitsWithResponse call +func ParseGetOrganizationPolicyLimitsResponse(rsp *http.Response) (*GetOrganizationPolicyLimitsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationPolicyLimitsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + PolicyLimits OrganizationPolicy `json:"policy_limits"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationSecurityGroupsResponse parses an HTTP response from a GetOrganizationSecurityGroupsWithResponse call +func ParseGetOrganizationSecurityGroupsResponse(rsp *http.Response) (*GetOrganizationSecurityGroupsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationSecurityGroupsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + + // SecurityGroups The security groups owned by this organization + SecurityGroups []SecurityGroup `json:"security_groups"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationSecurityGroupsResponse parses an HTTP response from a PostOrganizationSecurityGroupsWithResponse call +func ParsePostOrganizationSecurityGroupsResponse(rsp *http.Response) (*PostOrganizationSecurityGroupsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationSecurityGroupsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroup The security group that has been created + SecurityGroup SecurityGroup `json:"security_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationSshKeysResponse parses an HTTP response from a GetOrganizationSshKeysWithResponse call +func ParseGetOrganizationSshKeysResponse(rsp *http.Response) (*GetOrganizationSshKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationSshKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + SshKeys []AuthSSHKey `json:"ssh_keys"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationSshKeysResponse parses an HTTP response from a PostOrganizationSshKeysWithResponse call +func ParsePostOrganizationSshKeysResponse(rsp *http.Response) (*PostOrganizationSshKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationSshKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + SshKey AuthSSHKey `json:"ssh_key"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationTagsResponse parses an HTTP response from a GetOrganizationTagsWithResponse call +func ParseGetOrganizationTagsResponse(rsp *http.Response) (*GetOrganizationTagsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationTagsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + + // Tags The details for the tags on the organization + Tags []GetOrganizationTags200ResponseTags `json:"tags"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationTagsResponse parses an HTTP response from a PostOrganizationTagsWithResponse call +func ParsePostOrganizationTagsResponse(rsp *http.Response) (*PostOrganizationTagsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationTagsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Tag The newly created tag + Tag Tag `json:"tag"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationTrashObjectsResponse parses an HTTP response from a GetOrganizationTrashObjectsWithResponse call +func ParseGetOrganizationTrashObjectsResponse(rsp *http.Response) (*GetOrganizationTrashObjectsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationTrashObjectsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + + // TrashObjects The trash objects that belong to this organization + TrashObjects []TrashObject `json:"trash_objects"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationTrashObjectsPurgeAllResponse parses an HTTP response from a PostOrganizationTrashObjectsPurgeAllWithResponse call +func ParsePostOrganizationTrashObjectsPurgeAllResponse(rsp *http.Response) (*PostOrganizationTrashObjectsPurgeAllResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationTrashObjectsPurgeAllResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task Task `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest TaskQueueingErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationUsersWithAccessResponse parses an HTTP response from a GetOrganizationUsersWithAccessWithResponse call +func ParseGetOrganizationUsersWithAccessResponse(rsp *http.Response) (*GetOrganizationUsersWithAccessResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationUsersWithAccessResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + Users []GetOrganizationUsersWithAccess200ResponseUsers `json:"users"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationVirtualMachineGroupsResponse parses an HTTP response from a GetOrganizationVirtualMachineGroupsWithResponse call +func ParseGetOrganizationVirtualMachineGroupsResponse(rsp *http.Response) (*GetOrganizationVirtualMachineGroupsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationVirtualMachineGroupsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineGroups The virtual machine groups for the provided organization + VirtualMachineGroups []VirtualMachineGroup `json:"virtual_machine_groups"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationVirtualMachineGroupsResponse parses an HTTP response from a PostOrganizationVirtualMachineGroupsWithResponse call +func ParsePostOrganizationVirtualMachineGroupsResponse(rsp *http.Response) (*PostOrganizationVirtualMachineGroupsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationVirtualMachineGroupsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineGroup The new virtual machine group details + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetOrganizationVirtualMachinesResponse parses an HTTP response from a GetOrganizationVirtualMachinesWithResponse call +func ParseGetOrganizationVirtualMachinesResponse(rsp *http.Response) (*GetOrganizationVirtualMachinesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetOrganizationVirtualMachinesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + VirtualMachines []GetOrganizationVirtualMachines200ResponseVirtualMachines `json:"virtual_machines"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationVirtualMachinesBuildResponse parses an HTTP response from a PostOrganizationVirtualMachinesBuildWithResponse call +func ParsePostOrganizationVirtualMachinesBuildResponse(rsp *http.Response) (*PostOrganizationVirtualMachinesBuildResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationVirtualMachinesBuildResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // Build Deprecated, please use "virtual_machine_build" instead + Build PostOrganizationVirtualMachinesBuild201ResponseBuild `json:"build"` + Hostname string `json:"hostname"` + Task PostOrganizationVirtualMachinesBuild201ResponseTask `json:"task"` + VirtualMachineBuild PostOrganizationVirtualMachinesBuild201ResponseVirtualMachineBuild `json:"virtual_machine_build"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest DataCenterNotFoundVirtualMachinePackageNotFoundZoneNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest LocationRequiredValidationError422Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostOrganizationVirtualMachinesBuildFromSpecResponse parses an HTTP response from a PostOrganizationVirtualMachinesBuildFromSpecWithResponse call +func ParsePostOrganizationVirtualMachinesBuildFromSpecResponse(rsp *http.Response) (*PostOrganizationVirtualMachinesBuildFromSpecResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostOrganizationVirtualMachinesBuildFromSpecResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + // Build Deprecated, please use "virtual_machine_build" instead + Build PostOrganizationVirtualMachinesBuildFromSpec201ResponseBuild `json:"build"` + Hostname string `json:"hostname"` + Task PostOrganizationVirtualMachinesBuildFromSpec201ResponseTask `json:"task"` + VirtualMachineBuild PostOrganizationVirtualMachinesBuildFromSpec201ResponseVirtualMachineBuild `json:"virtual_machine_build"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest InvalidSpecXML400Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteSecurityGroupResponse parses an HTTP response from a DeleteSecurityGroupWithResponse call +func ParseDeleteSecurityGroupResponse(rsp *http.Response) (*DeleteSecurityGroupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteSecurityGroupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroup The security group that has been destroyed + SecurityGroup DeleteSecurityGroup200ResponseSecurityGroup `json:"security_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest DeletionRestrictedResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetSecurityGroupResponse parses an HTTP response from a GetSecurityGroupWithResponse call +func ParseGetSecurityGroupResponse(rsp *http.Response) (*GetSecurityGroupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSecurityGroupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroup The security group + SecurityGroup SecurityGroup `json:"security_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchSecurityGroupResponse parses an HTTP response from a PatchSecurityGroupWithResponse call +func ParsePatchSecurityGroupResponse(rsp *http.Response) (*PatchSecurityGroupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchSecurityGroupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroup The security group that has been updated + SecurityGroup SecurityGroup `json:"security_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetSecurityGroupRulesResponse parses an HTTP response from a GetSecurityGroupRulesWithResponse call +func ParseGetSecurityGroupRulesResponse(rsp *http.Response) (*GetSecurityGroupRulesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSecurityGroupRulesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + + // SecurityGroupRules The security group rules for this security group + SecurityGroupRules []GetSecurityGroupRules200ResponseSecurityGroupRules `json:"security_group_rules"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostSecurityGroupRulesResponse parses an HTTP response from a PostSecurityGroupRulesWithResponse call +func ParsePostSecurityGroupRulesResponse(rsp *http.Response) (*PostSecurityGroupRulesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostSecurityGroupRulesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroupRule The security group rule that has been created + SecurityGroupRule PostSecurityGroupRules200ResponseSecurityGroupRule `json:"security_group_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse parses an HTTP response from a DeleteSecurityGroupsRulesSecurityGroupRuleWithResponse call +func ParseDeleteSecurityGroupsRulesSecurityGroupRuleResponse(rsp *http.Response) (*DeleteSecurityGroupsRulesSecurityGroupRuleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteSecurityGroupsRulesSecurityGroupRuleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroupRule The security group rule that has been destroyed + SecurityGroupRule DeleteSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupRuleNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetSecurityGroupsRulesSecurityGroupRuleResponse parses an HTTP response from a GetSecurityGroupsRulesSecurityGroupRuleWithResponse call +func ParseGetSecurityGroupsRulesSecurityGroupRuleResponse(rsp *http.Response) (*GetSecurityGroupsRulesSecurityGroupRuleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetSecurityGroupsRulesSecurityGroupRuleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroupRule The resolved security group rule + SecurityGroupRule GetSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupRuleNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse parses an HTTP response from a PatchSecurityGroupsRulesSecurityGroupRuleWithResponse call +func ParsePatchSecurityGroupsRulesSecurityGroupRuleResponse(rsp *http.Response) (*PatchSecurityGroupsRulesSecurityGroupRuleResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchSecurityGroupsRulesSecurityGroupRuleResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // SecurityGroupRule The security group that has been updated + SecurityGroupRule PatchSecurityGroupsRulesSecurityGroupRule200ResponseSecurityGroupRule `json:"security_group_rule"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SecurityGroupRuleNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteSshKeyResponse parses an HTTP response from a DeleteSshKeyWithResponse call +func ParseDeleteSshKeyResponse(rsp *http.Response) (*DeleteSshKeyResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteSshKeyResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + SshKey AuthSSHKey `json:"ssh_key"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest SSHKeyNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest DeletionRestrictedResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteTagResponse parses an HTTP response from a DeleteTagWithResponse call +func ParseDeleteTagResponse(rsp *http.Response) (*DeleteTagResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTagResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Tag The newly deleted tag + Tag Tag `json:"tag"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest TagNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetTagResponse parses an HTTP response from a GetTagWithResponse call +func ParseGetTagResponse(rsp *http.Response) (*GetTagResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTagResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Tag The details for the requested tag + Tag Tag `json:"tag"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest TagNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchTagResponse parses an HTTP response from a PatchTagWithResponse call +func ParsePatchTagResponse(rsp *http.Response) (*PatchTagResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchTagResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Tag The newly updated tag + Tag Tag `json:"tag"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest TagNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetTaskResponse parses an HTTP response from a GetTaskWithResponse call +func ParseGetTaskResponse(rsp *http.Response) (*GetTaskResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTaskResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task Task `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest TaskNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteTrashObjectResponse parses an HTTP response from a DeleteTrashObjectWithResponse call +func ParseDeleteTrashObjectResponse(rsp *http.Response) (*DeleteTrashObjectResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteTrashObjectResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task Task `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest TrashObjectNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest TaskQueueingErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetTrashObjectResponse parses an HTTP response from a GetTrashObjectWithResponse call +func ParseGetTrashObjectResponse(rsp *http.Response) (*GetTrashObjectResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetTrashObjectResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // TrashObject The requested trash object + TrashObject TrashObject `json:"trash_object"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest TrashObjectNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostTrashObjectRestoreResponse parses an HTTP response from a PostTrashObjectRestoreWithResponse call +func ParsePostTrashObjectRestoreResponse(rsp *http.Response) (*PostTrashObjectRestoreResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostTrashObjectRestoreResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // TrashObject The requested trash object + TrashObject TrashObject `json:"trash_object"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest TrashObjectNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetUsersCurrentResponse parses an HTTP response from a GetUsersCurrentWithResponse call +func ParseGetUsersCurrentResponse(rsp *http.Response) (*GetUsersCurrentResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetUsersCurrentResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + ApiTokenId string `json:"api_token_id"` + Organizations []GetUsersCurrent200ResponseOrganizations `json:"organizations"` + User User `json:"user"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NoUserAssociatedWithIdentityResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineAuthorizedKeysResponse parses an HTTP response from a GetVirtualMachineAuthorizedKeysWithResponse call +func ParseGetVirtualMachineAuthorizedKeysResponse(rsp *http.Response) (*GetVirtualMachineAuthorizedKeysResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineAuthorizedKeysResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + AuthorizedKeys string `json:"authorized_keys"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NoVirtualMachineForAPITokenResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteVirtualMachineGroupResponse parses an HTTP response from a DeleteVirtualMachineGroupWithResponse call +func ParseDeleteVirtualMachineGroupResponse(rsp *http.Response) (*DeleteVirtualMachineGroupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteVirtualMachineGroupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineGroup The details for the deleted virtual machine group + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: + var dest DeletionRestrictedResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON409 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineGroupResponse parses an HTTP response from a GetVirtualMachineGroupWithResponse call +func ParseGetVirtualMachineGroupResponse(rsp *http.Response) (*GetVirtualMachineGroupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineGroupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineGroup The virtual machine group details + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchVirtualMachineGroupResponse parses an HTTP response from a PatchVirtualMachineGroupWithResponse call +func ParsePatchVirtualMachineGroupResponse(rsp *http.Response) (*PatchVirtualMachineGroupResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchVirtualMachineGroupResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineGroup The updated virtual machine group details + VirtualMachineGroup VirtualMachineGroup `json:"virtual_machine_group"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineGroupNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVMNIVMNIResponse parses an HTTP response from a GetVMNIVMNIWithResponse call +func ParseGetVMNIVMNIResponse(rsp *http.Response) (*GetVMNIVMNIResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVMNIVMNIResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineNetworkInterface The network interface details + VirtualMachineNetworkInterface GetVMNIVMNI200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNetworkInterfaceNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse parses an HTTP response from a PostVirtualMachineNetworkInterfaceAllocateIpWithResponse call +func ParsePostVirtualMachineNetworkInterfaceAllocateIpResponse(rsp *http.Response) (*PostVirtualMachineNetworkInterfaceAllocateIpResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineNetworkInterfaceAllocateIpResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineNetworkInterface The network interface details + VirtualMachineNetworkInterface PostVirtualMachineNetworkInterfaceAllocateIP200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest IPAddressNotFoundVirtualMachineNetworkInterfaceNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest IPAlreadyAllocatedInvalidIP422Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse parses an HTTP response from a PostVirtualMachineNetworkInterfaceAllocateNewIpWithResponse call +func ParsePostVirtualMachineNetworkInterfaceAllocateNewIpResponse(rsp *http.Response) (*PostVirtualMachineNetworkInterfaceAllocateNewIpResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineNetworkInterfaceAllocateNewIpResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // IpAddress The newly allocated IP address + IpAddress IPAddress `json:"ip_address"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNetworkInterfaceNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 503: + var dest NoAvailableAddressesResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON503 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse parses an HTTP response from a GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionWithResponse call +func ParseGetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse(rsp *http.Response) (*GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineNetworkInterfaceAvailableIpsAddressVersionResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // IpAddresses The IP addresses available for this network interface + IpAddresses []IPAddress `json:"ip_addresses"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNetworkInterfaceNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse parses an HTTP response from a PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileWithResponse call +func ParsePatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse(rsp *http.Response) (*PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchVirtualMachineNetworkInterfaceUpdateSpeedProfileResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Task The task responsible for updating the virtual machine network interface speed profile + Task Task `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest NetworkSpeedProfileNotFoundVirtualMachineNetworkInterfaceNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest TaskQueueingErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest SpeedProfileAlreadyAssignedResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachinePackagesResponse parses an HTTP response from a GetVirtualMachinePackagesWithResponse call +func ParseGetVirtualMachinePackagesResponse(rsp *http.Response) (*GetVirtualMachinePackagesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachinePackagesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + VirtualMachinePackages []GetVirtualMachinePackages200ResponseVirtualMachinePackages `json:"virtual_machine_packages"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest OrganizationNotActivatedOrganizationSuspended403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest OrganizationNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachinePackageResponse parses an HTTP response from a GetVirtualMachinePackageWithResponse call +func ParseGetVirtualMachinePackageResponse(rsp *http.Response) (*GetVirtualMachinePackageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachinePackageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + VirtualMachinePackage VirtualMachinePackage `json:"virtual_machine_package"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachinePackageNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseDeleteVirtualMachineResponse parses an HTTP response from a DeleteVirtualMachineWithResponse call +func ParseDeleteVirtualMachineResponse(rsp *http.Response) (*DeleteVirtualMachineResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &DeleteVirtualMachineResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + TrashObject TrashObject `json:"trash_object"` + VirtualMachine DeleteVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineResponse parses an HTTP response from a GetVirtualMachineWithResponse call +func ParseGetVirtualMachineResponse(rsp *http.Response) (*GetVirtualMachineResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + VirtualMachine GetVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePatchVirtualMachineResponse parses an HTTP response from a PatchVirtualMachineWithResponse call +func ParsePatchVirtualMachineResponse(rsp *http.Response) (*PatchVirtualMachineResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PatchVirtualMachineResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachine The newly updated virtual machine + VirtualMachine PatchVirtualMachine200ResponseVirtualMachine `json:"virtual_machine"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineAllocateIpResponse parses an HTTP response from a PostVirtualMachineAllocateIpWithResponse call +func ParsePostVirtualMachineAllocateIpResponse(rsp *http.Response) (*PostVirtualMachineAllocateIpResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineAllocateIpResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // IpAddress The newly allocated IP address + IpAddress IPAddress `json:"ip_address"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest IPAddressNotFoundVirtualMachineNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest IPAlreadyAllocatedNoInterfaceAvailable422Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineConsoleSessionsResponse parses an HTTP response from a PostVirtualMachineConsoleSessionsWithResponse call +func ParsePostVirtualMachineConsoleSessionsResponse(rsp *http.Response) (*PostVirtualMachineConsoleSessionsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineConsoleSessionsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: + var dest struct { + ConsoleSession PostVirtualMachineConsoleSessions201ResponseConsoleSession `json:"console_session"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON201 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashVirtualMachineMustBeStarted406Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineDiskBackupPoliciesResponse parses an HTTP response from a GetVirtualMachineDiskBackupPoliciesWithResponse call +func ParseGetVirtualMachineDiskBackupPoliciesResponse(rsp *http.Response) (*GetVirtualMachineDiskBackupPoliciesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineDiskBackupPoliciesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicies The disk backup policies for the provided virtual machine + DiskBackupPolicies []GetVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicies `json:"disk_backup_policies"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineDiskBackupPoliciesResponse parses an HTTP response from a PostVirtualMachineDiskBackupPoliciesWithResponse call +func ParsePostVirtualMachineDiskBackupPoliciesResponse(rsp *http.Response) (*PostVirtualMachineDiskBackupPoliciesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineDiskBackupPoliciesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // DiskBackupPolicy The new disk backup policy that has been created + DiskBackupPolicy PostVirtualMachineDiskBackupPolicies200ResponseDiskBackupPolicy `json:"disk_backup_policy"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineDisksResponse parses an HTTP response from a GetVirtualMachineDisksWithResponse call +func ParseGetVirtualMachineDisksResponse(rsp *http.Response) (*GetVirtualMachineDisksResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineDisksResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Disks The list of disks + Disks []GetVirtualMachineDisks200ResponseDisks `json:"disks"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePutVirtualMachineFlexibleResourcesResponse parses an HTTP response from a PutVirtualMachineFlexibleResourcesWithResponse call +func ParsePutVirtualMachineFlexibleResourcesResponse(rsp *http.Response) (*PutVirtualMachineFlexibleResourcesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutVirtualMachineFlexibleResourcesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task Task `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest FlexibleResourcesUnavailableToOrganizationPermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashTaskQueueingError406Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineNetworkInterfacesResponse parses an HTTP response from a GetVirtualMachineNetworkInterfacesWithResponse call +func ParseGetVirtualMachineNetworkInterfacesResponse(rsp *http.Response) (*GetVirtualMachineNetworkInterfacesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineNetworkInterfacesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Pagination PaginationObject `json:"pagination"` + + // VirtualMachineNetworkInterfaces The network interfaces for this virtual machine + VirtualMachineNetworkInterfaces []GetVirtualMachineNetworkInterfaces200ResponseVirtualMachineNetworkInterfaces `json:"virtual_machine_network_interfaces"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachineNetworkInterfaceResponse parses an HTTP response from a GetVirtualMachineNetworkInterfaceWithResponse call +func ParseGetVirtualMachineNetworkInterfaceResponse(rsp *http.Response) (*GetVirtualMachineNetworkInterfaceResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachineNetworkInterfaceResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // VirtualMachineNetworkInterface The network interface details + VirtualMachineNetworkInterface GetVirtualMachineNetworkInterface200ResponseVirtualMachineNetworkInterface `json:"virtual_machine_network_interface"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest InterfaceNotFoundNetworkNotFoundVirtualMachineNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePutVirtualMachinePackageResponse parses an HTTP response from a PutVirtualMachinePackageWithResponse call +func ParsePutVirtualMachinePackageResponse(rsp *http.Response) (*PutVirtualMachinePackageResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PutVirtualMachinePackageResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task Task `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundVirtualMachinePackageNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashTaskQueueingError406Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineResetResponse parses an HTTP response from a PostVirtualMachineResetWithResponse call +func ParsePostVirtualMachineResetResponse(rsp *http.Response) (*PostVirtualMachineResetResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineResetResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task PostVirtualMachineReset200ResponseTask `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashTaskQueueingError406Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineShutdownResponse parses an HTTP response from a PostVirtualMachineShutdownWithResponse call +func ParsePostVirtualMachineShutdownResponse(rsp *http.Response) (*PostVirtualMachineShutdownResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineShutdownResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task PostVirtualMachineShutdown200ResponseTask `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashTaskQueueingError406Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineStartResponse parses an HTTP response from a PostVirtualMachineStartWithResponse call +func ParsePostVirtualMachineStartResponse(rsp *http.Response) (*PostVirtualMachineStartResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineStartResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task PostVirtualMachineStart200ResponseTask `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashTaskQueueingError406Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostVirtualMachineStopResponse parses an HTTP response from a PostVirtualMachineStopWithResponse call +func ParsePostVirtualMachineStopResponse(rsp *http.Response) (*PostVirtualMachineStopResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostVirtualMachineStopResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + Task PostVirtualMachineStop200ResponseTask `json:"task"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied403Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 406: + var dest ObjectInTrashTaskQueueingError406Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON406 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachinesBuildsVirtualMachineBuildResponse parses an HTTP response from a GetVirtualMachinesBuildsVirtualMachineBuildWithResponse call +func ParseGetVirtualMachinesBuildsVirtualMachineBuildResponse(rsp *http.Response) (*GetVirtualMachinesBuildsVirtualMachineBuildResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachinesBuildsVirtualMachineBuildResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + VirtualMachineBuild GetVirtualMachinesBuildsVirtualMachineBuild200ResponseVirtualMachineBuild `json:"virtual_machine_build"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest VirtualMachineBuildNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetZonesResponse parses an HTTP response from a GetZonesWithResponse call +func ParseGetZonesResponse(rsp *http.Response) (*GetZonesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetZonesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Zones The zones available to the current identity + Zones []GetZones200ResponseZones `json:"zones"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetZoneResponse parses an HTTP response from a GetZoneWithResponse call +func ParseGetZoneResponse(rsp *http.Response) (*GetZoneResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetZoneResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Zone The zone details + Zone Zone `json:"zone"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest APIAuthenticator400Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest ZoneNotFoundResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} diff --git a/next/generate.sh b/next/generate.sh index b9fc3b1..c554cf3 100755 --- a/next/generate.sh +++ b/next/generate.sh @@ -10,6 +10,16 @@ docker run \ --rm \ "$(docker build -f Dockerfile --build-arg="GO_VERSION=$go_version" --build-arg="GENERATOR_VERSION=$generator_version" -q .)" \ -generate types,client \ - -package next \ + -package core \ -templates /local/templates \ - /local/katapult-openapi.json > "./client.go" + /local/katapult-core-openapi.json > "./core/core.go" + +docker run \ + --user "$(id -u):$(id -g)" \ + -v "$(pwd):/local" \ + --rm \ + "$(docker build -f Dockerfile --build-arg="GO_VERSION=$go_version" --build-arg="GENERATOR_VERSION=$generator_version" -q .)" \ + -generate types,client \ + -package public \ + -templates /local/templates \ + /local/katapult-public-openapi.json > "./public/public.go" diff --git a/next/katapult-openapi.json b/next/katapult-core-openapi.json similarity index 93% rename from next/katapult-openapi.json rename to next/katapult-core-openapi.json index 775ad8a..f269beb 100644 --- a/next/katapult-openapi.json +++ b/next/katapult-core-openapi.json @@ -271,6 +271,63 @@ } } }, + "/organizations/:organization/policy_limits": { + "get": { + "operationId": "get:organization_policy_limits", + "tags": [ + "Core" + ], + "parameters": [ + { + "name": "organization[id]", + "in": "query", + "schema": { + "type": "string" + }, + "description": "All 'organization[]' params are mutually exclusive, only one can be provided." + }, + { + "name": "organization[sub_domain]", + "in": "query", + "schema": { + "type": "string" + }, + "description": "All 'organization[]' params are mutually exclusive, only one can be provided." + } + ], + "responses": { + "200": { + "description": "Returns the computed policy limits for a organization", + "content": { + "application/json": { + "schema": { + "properties": { + "policy_limits": { + "$ref": "#/components/schemas/OrganizationPolicy" + } + }, + "required": [ + "policy_limits" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/OrganizationNotActivatedOrganizationSuspended403Res" + }, + "404": { + "$ref": "#/components/responses/OrganizationNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, "/organizations/:organization/users_with_access": { "get": { "operationId": "get:organization_users_with_access", @@ -1707,6 +1764,48 @@ } } }, + "/virtual_machine/authorized_keys": { + "get": { + "operationId": "get:virtual_machine_authorized_keys", + "tags": [ + "Core" + ], + "parameters": [ + + ], + "responses": { + "200": { + "description": "Return the authorized keys for the virtual machine associated with the provided API token", + "content": { + "application/json": { + "schema": { + "properties": { + "authorized_keys": { + "type": "string" + } + }, + "required": [ + "authorized_keys" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "404": { + "$ref": "#/components/responses/NoVirtualMachineForAPITokenResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, "/organizations/:organization/virtual_machines/build": { "post": { "operationId": "post:organization_virtual_machines_build", @@ -5066,35 +5165,729 @@ "type": "integer" } }, - { - "name": "per_page", - "in": "query", - "schema": { - "type": "integer" - } + { + "name": "per_page", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns a list of all network speed profiles available to an organization", + "content": { + "application/json": { + "schema": { + "properties": { + "pagination": { + "$ref": "#/components/schemas/PaginationObject" + }, + "network_speed_profiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NetworkSpeedProfile" + }, + "description": "The network speed profiles available to this organization" + } + }, + "required": [ + "pagination", + "network_speed_profiles" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/OrganizationNotActivatedOrganizationSuspended403Res" + }, + "404": { + "$ref": "#/components/responses/OrganizationNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/address_lists": { + "get": { + "operationId": "get:address_lists", + "tags": [ + "Core" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns a list of all global address lists.", + "content": { + "application/json": { + "schema": { + "properties": { + "pagination": { + "$ref": "#/components/schemas/PaginationObject" + }, + "address_lists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetAddressLists200ResponseAddressLists" + }, + "description": "A list of all global address lists." + } + }, + "required": [ + "pagination", + "address_lists" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/organizations/:organization/address_lists": { + "get": { + "operationId": "get:organization_address_lists", + "tags": [ + "Core" + ], + "parameters": [ + { + "name": "organization[id]", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The organization for which the address lists should be returned. All 'organization[]' params are mutually exclusive, only one can be provided." + }, + { + "name": "organization[sub_domain]", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The organization for which the address lists should be returned. All 'organization[]' params are mutually exclusive, only one can be provided." + }, + { + "name": "page", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns a list of all address lists for a given organization", + "content": { + "application/json": { + "schema": { + "properties": { + "pagination": { + "$ref": "#/components/schemas/PaginationObject" + }, + "address_lists": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetOrganizationAddressLists200ResponseAddressLists" + }, + "description": "A list of all address lists for the given organization." + } + }, + "required": [ + "pagination", + "address_lists" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res" + }, + "404": { + "$ref": "#/components/responses/OrganizationNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + }, + "post": { + "operationId": "post:organization_address_lists", + "tags": [ + "Core" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "organization": { + "$ref": "#/components/schemas/OrganizationLookup" + }, + "properties": { + "$ref": "#/components/schemas/AddressListArguments" + } + }, + "required": [ + "organization", + "properties" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Create a new address list for a given organization.", + "content": { + "application/json": { + "schema": { + "properties": { + "address_list": { + "description": "The address list.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressList" + } + ] + } + }, + "required": [ + "address_list" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/OrganizationNotActivatedOrganizationSuspendedPermissionDenied403Res" + }, + "404": { + "$ref": "#/components/responses/OrganizationNotFoundResponse" + }, + "422": { + "$ref": "#/components/responses/ValidationErrorResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/address_lists/:address_list": { + "get": { + "operationId": "get:address_list", + "tags": [ + "Core" + ], + "parameters": [ + { + "name": "address_list[id]", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The address list to return. All 'address_list[]' params are mutually exclusive, only one can be provided." + } + ], + "responses": { + "200": { + "description": "Returns details for a address list.", + "content": { + "application/json": { + "schema": { + "properties": { + "address_list": { + "description": "The address list.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressList" + } + ] + } + }, + "required": [ + "address_list" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "404": { + "$ref": "#/components/responses/AddressListNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + }, + "patch": { + "operationId": "patch:address_list", + "tags": [ + "Core" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "address_list": { + "$ref": "#/components/schemas/AddressListLookup" + }, + "properties": { + "$ref": "#/components/schemas/AddressListArguments" + } + }, + "required": [ + "address_list", + "properties" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Update a address list with new properties.", + "content": { + "application/json": { + "schema": { + "properties": { + "address_list": { + "description": "The address list.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressList" + } + ] + } + }, + "required": [ + "address_list" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/PermissionDenied403Res" + }, + "404": { + "$ref": "#/components/responses/AddressListNotFoundResponse" + }, + "422": { + "$ref": "#/components/responses/ValidationErrorResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + }, + "delete": { + "operationId": "delete:address_list", + "tags": [ + "Core" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "address_list": { + "$ref": "#/components/schemas/AddressListLookup" + } + }, + "required": [ + "address_list" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Delete a address list.", + "content": { + "application/json": { + "schema": { + "properties": { + "address_list": { + "description": "The address list that has been destroyed.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressList" + } + ] + } + }, + "required": [ + "address_list" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/PermissionDenied403Res" + }, + "404": { + "$ref": "#/components/responses/AddressListNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/address_lists/:address_list/entries": { + "get": { + "operationId": "get:address_list_entries", + "tags": [ + "Core" + ], + "parameters": [ + { + "name": "address_list[id]", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The address list for which the entries should be returned. All 'address_list[]' params are mutually exclusive, only one can be provided." + }, + { + "name": "page", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Returns a list of all address list entries for a given address list", + "content": { + "application/json": { + "schema": { + "properties": { + "pagination": { + "$ref": "#/components/schemas/PaginationObject" + }, + "address_list_entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressListEntry" + }, + "description": "A list of all address list entries for the given address list." + } + }, + "required": [ + "pagination", + "address_list_entries" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/PermissionDenied403Res" + }, + "404": { + "$ref": "#/components/responses/AddressListNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + }, + "post": { + "operationId": "post:address_list_entries", + "tags": [ + "Core" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "address_list": { + "$ref": "#/components/schemas/AddressListLookup" + }, + "properties": { + "$ref": "#/components/schemas/AddressListEntryArguments" + } + }, + "required": [ + "address_list", + "properties" + ] + } + } + } + }, + "responses": { + "201": { + "description": "Create a new address list entry for a given address list.", + "content": { + "application/json": { + "schema": { + "properties": { + "address_list_entry": { + "description": "The address list entry.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressListEntry" + } + ] + } + }, + "required": [ + "address_list_entry" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/PermissionDenied403Res" + }, + "404": { + "$ref": "#/components/responses/AddressListNotFoundResponse" + }, + "422": { + "$ref": "#/components/responses/ValidationErrorResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/address_list_entries/:address_list_entry": { + "get": { + "operationId": "get:address_list_entry", + "tags": [ + "Core" + ], + "parameters": [ + { + "name": "address_list_entry[id]", + "in": "query", + "schema": { + "type": "string" + }, + "description": "The address list entry to return. All 'address_list_entry[]' params are mutually exclusive, only one can be provided." + } + ], + "responses": { + "200": { + "description": "Returns details for an address list entry.", + "content": { + "application/json": { + "schema": { + "properties": { + "address_list_entry": { + "description": "The address list entry.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressListEntry" + } + ] + } + }, + "required": [ + "address_list_entry" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "404": { + "$ref": "#/components/responses/AddressListEntryNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + }, + "patch": { + "operationId": "patch:address_list_entry", + "tags": [ + "Core" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "address_list_entry": { + "$ref": "#/components/schemas/AddressListEntryLookup" + }, + "properties": { + "$ref": "#/components/schemas/AddressListEntryArguments" + } + }, + "required": [ + "address_list_entry", + "properties" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Update an address list entry with new properties.", + "content": { + "application/json": { + "schema": { + "properties": { + "address_list_entry": { + "description": "The address list entry.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressListEntry" + } + ] + } + }, + "required": [ + "address_list_entry" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/APIAuthenticator400Response" + }, + "403": { + "$ref": "#/components/responses/PermissionDenied403Res" + }, + "404": { + "$ref": "#/components/responses/AddressListEntryNotFoundResponse" + }, + "422": { + "$ref": "#/components/responses/ValidationErrorResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" } + } + }, + "delete": { + "operationId": "delete:address_list_entry", + "tags": [ + "Core" ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "address_list_entry": { + "$ref": "#/components/schemas/AddressListEntryLookup" + } + }, + "required": [ + "address_list_entry" + ] + } + } + } + }, "responses": { "200": { - "description": "Returns a list of all network speed profiles available to an organization", + "description": "Delete an address list entry.", "content": { "application/json": { "schema": { "properties": { - "pagination": { - "$ref": "#/components/schemas/PaginationObject" - }, - "network_speed_profiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NetworkSpeedProfile" - }, - "description": "The network speed profiles available to this organization" + "address_list_entry": { + "description": "The address list entry that has been destroyed.", + "allOf": [ + { + "$ref": "#/components/schemas/AddressListEntry" + } + ] } }, "required": [ - "pagination", - "network_speed_profiles" + "address_list_entry" ] } } @@ -5104,10 +5897,10 @@ "$ref": "#/components/responses/APIAuthenticator400Response" }, "403": { - "$ref": "#/components/responses/OrganizationNotActivatedOrganizationSuspended403Res" + "$ref": "#/components/responses/PermissionDenied403Res" }, "404": { - "$ref": "#/components/responses/OrganizationNotFoundResponse" + "$ref": "#/components/responses/AddressListEntryNotFoundResponse" }, "429": { "$ref": "#/components/responses/APIAuthenticator429Response" @@ -6244,6 +7037,7 @@ "application/json": { "schema": { "properties": { + } } } @@ -6296,6 +7090,7 @@ "application/json": { "schema": { "properties": { + } } } @@ -8472,6 +9267,7 @@ "application/json": { "schema": { "properties": { + } } } @@ -8960,6 +9756,84 @@ "organization_not_found" ] }, + "OrganizationPolicy": { + "type": "object", + "properties": { + "maximum_uninvoiced_balance": { + "$ref": "#/components/schemas/DecimalOrUnlimited" + }, + "maximum_virtual_machines": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_virtual_machine_memory": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_disk_space": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_managed_organizations": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_unallocated_ip_addresses": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_security_groups": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_virtual_networks": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_load_balancers": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_dns_zones": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_certificates": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_file_storage_volumes": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "maximum_isos": { + "$ref": "#/components/schemas/IntegerOrUnlimited" + }, + "flexible_virtual_machine_resources": { + "type": "boolean" + }, + "allow_suspension": { + "type": "boolean" + }, + "allow_restricted_traffic_types": { + "type": "boolean" + } + } + }, + "DecimalOrUnlimited": { + "type": "object", + "properties": { + "value": { + "type": "number", + "format": "float", + "nullable": true + }, + "unlimited": { + "type": "boolean" + } + } + }, + "IntegerOrUnlimited": { + "type": "object", + "properties": { + "value": { + "type": "integer", + "nullable": true + }, + "unlimited": { + "type": "boolean" + } + } + }, "PaginationObject": { "type": "object", "properties": { @@ -10184,6 +11058,7 @@ "migrating", "stopping", "shutting_down", + "transferring", "orphaned" ] }, @@ -11152,6 +12027,12 @@ } ] }, + "NoVirtualMachineForAPITokenEnum": { + "type": "string", + "enum": [ + "no_virtual_machine_for_api_token" + ] + }, "ZoneLookup": { "description": "All 'zone[]' params are mutually exclusive, only one can be provided.", "type": "object", @@ -13603,6 +14484,130 @@ } } }, + "GetAddressLists200ResponseAddressLists": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the address list." + }, + "global": { + "type": "boolean", + "description": "Whether the address list is global or not." + } + } + }, + "GetOrganizationAddressLists200ResponseAddressLists": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the address list." + }, + "global": { + "type": "boolean", + "description": "Whether the address list is global or not." + } + } + }, + "AddressList": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "description": "Name of the address list." + }, + "global": { + "type": "boolean", + "description": "Whether the address list is global or not." + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressListEntry" + } + } + } + }, + "AddressListEntry": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "address": { + "type": "string", + "description": "Address or network." + }, + "name": { + "type": "string", + "description": "Optional name/comment." + } + } + }, + "AddressListNotFoundEnum": { + "type": "string", + "enum": [ + "address_list_not_found" + ] + }, + "AddressListArguments": { + "description": "All 'properties[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the address list." + } + } + }, + "AddressListLookup": { + "description": "All 'address_list[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "AddressListEntryNotFoundEnum": { + "type": "string", + "enum": [ + "address_list_entry_not_found" + ] + }, + "AddressListEntryArguments": { + "description": "All 'properties[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Address or network to add to the list." + }, + "name": { + "type": "string", + "description": "Optional name/comment." + } + } + }, + "AddressListEntryLookup": { + "description": "All 'address_list_entry[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, "GetOrganizationCertificates200ResponseCertificates": { "type": "object", "properties": { @@ -13739,10 +14744,7 @@ } }, "ip_address": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetOrganizationLoadBalancersPartIPAddress" - } + "$ref": "#/components/schemas/GetOrganizationLoadBalancersPartIPAddress" }, "data_center": { "$ref": "#/components/schemas/GetOrganizationLoadBalancersPartDataCenter" @@ -13878,10 +14880,7 @@ } }, "ip_address": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PostOrganizationLoadBalancersPartIPAddress" - } + "$ref": "#/components/schemas/PostOrganizationLoadBalancersPartIPAddress" }, "https_redirect": { "type": "boolean" @@ -13978,10 +14977,7 @@ } }, "ip_address": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetLoadBalancerPartIPAddress" - } + "$ref": "#/components/schemas/GetLoadBalancerPartIPAddress" }, "https_redirect": { "type": "boolean" @@ -14085,10 +15081,7 @@ } }, "ip_address": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PatchLoadBalancerPartIPAddress" - } + "$ref": "#/components/schemas/PatchLoadBalancerPartIPAddress" }, "https_redirect": { "type": "boolean" @@ -15630,6 +16623,26 @@ } } }, + "NoVirtualMachineForAPITokenResponse": { + "description": "No virtual machine was found for the provided API token", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "$ref": "#/components/schemas/NoVirtualMachineForAPITokenEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "type": "object" + } + } + } + } + } + }, "OrganizationNotActivatedPermissionDeniedResourceCreationRestricted403Res": { "description": "403 error response", "content": { @@ -15960,6 +16973,46 @@ } } }, + "AddressListNotFoundResponse": { + "description": "No address list was found matching any of the criteria provided in the arguments.", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "$ref": "#/components/schemas/AddressListNotFoundEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "type": "object" + } + } + } + } + } + }, + "AddressListEntryNotFoundResponse": { + "description": "No address list entry was found matching any of the criteria provided in the arguments.", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "$ref": "#/components/schemas/AddressListEntryNotFoundEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "type": "object" + } + } + } + } + } + }, "CertificateNotFoundResponse": { "description": "No certificate was found matching any of the criteria provided in the arguments", "content": { diff --git a/next/katapult-public-openapi.json b/next/katapult-public-openapi.json new file mode 100644 index 0000000..05d1325 --- /dev/null +++ b/next/katapult-public-openapi.json @@ -0,0 +1,1024 @@ +{ + "openapi": "3.0.0", + "info": { + "version": "1.0.0", + "title": "Katapult Public API", + "description": "Welcome to the documentation for the Katapult Public API" + }, + "servers": [ + { + "url": "https://api.katapult.io/public/v1" + } + ], + "paths": { + "/signups": { + "post": { + "operationId": "post:signups", + "tags": [ + "Core" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "email_address": { + "type": "string", + "description": "The e-mail address that should receive the welcome e-mail" + }, + "coupon": { + "type": "string", + "description": "The code for the coupon that will be applied to the first new organization created by the user" + }, + "campaign": { + "$ref": "#/components/schemas/SignupCampaignArguments" + } + }, + "required": [ + "email_address" + ] + } + } + } + }, + "responses": { + "200": { + "description": "This will create a new signup object and e-mail the appropriate welcome e-mail to the given email address", + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the signup" + }, + "email_address": { + "type": "string", + "description": "The e-mail address that was sent the welcome email" + } + }, + "required": [ + "id", + "email_address" + ] + } + } + } + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "404": { + "$ref": "#/components/responses/InvalidCouponCodeResponse" + }, + "422": { + "$ref": "#/components/responses/ValidationErrorResponse" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/stats": { + "get": { + "operationId": "get:stats", + "tags": [ + "Core" + ], + "parameters": [ + + ], + "responses": { + "200": { + "description": "Return some key statistics about the platform", + "content": { + "application/json": { + "schema": { + "properties": { + "total_virtual_machines_launched": { + "type": "integer", + "description": "The number of virtual machines launched (all time)" + }, + "total_virtual_machines_launched_today": { + "type": "integer", + "description": "The number of virtual machines launched today" + }, + "total_memory": { + "type": "integer", + "description": "The total amount of memory (in GB)" + }, + "total_cpu_cores": { + "type": "integer", + "description": "The total number of CPU cores" + }, + "total_block_storage": { + "type": "integer", + "description": "The total amount of block storage (in GB)" + }, + "total_organizations": { + "type": "integer", + "description": "The number of organizations" + } + }, + "required": [ + "total_virtual_machines_launched", + "total_virtual_machines_launched_today", + "total_memory", + "total_cpu_cores", + "total_block_storage", + "total_organizations" + ] + } + } + } + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/pricing/prices": { + "get": { + "operationId": "get:pricing_prices", + "tags": [ + "Core" + ], + "parameters": [ + + ], + "responses": { + "200": { + "description": "Return available prices for the system", + "content": { + "application/json": { + "schema": { + "properties": { + "prices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetPricingPrices200ResponsePrices" + }, + "description": "The prices in the default price plan" + } + }, + "required": [ + "prices" + ] + } + } + } + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/pricing/estimate": { + "post": { + "operationId": "post:pricing_estimate", + "tags": [ + "Core" + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "customer_name": { + "type": "string", + "description": "The customer's name" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PricingEstimateResourceArguments" + } + }, + "customer_type": { + "$ref": "#/components/schemas/CustomerTypeEnum" + }, + "currency": { + "$ref": "#/components/schemas/CurrencyLookup" + }, + "country": { + "$ref": "#/components/schemas/CountryLookup" + } + }, + "required": [ + "customer_name", + "resources", + "customer_type", + "currency", + "country" + ] + } + } + } + }, + "responses": { + "200": { + "description": "Return an estimate and breakdown of the cost of a configuration", + "content": { + "application/json": { + "schema": { + "properties": { + "estimate": { + "description": "The estimate, including breakdown, for a Katapult configuration", + "allOf": [ + { + "$ref": "#/components/schemas/PricingEstimate" + } + ] + } + }, + "required": [ + "estimate" + ] + } + } + } + }, + "400": { + "$ref": "#/components/responses/InvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res" + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "404": { + "$ref": "#/components/responses/CountryNotFoundCurrencyNotFound404Res" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/virtual_machine_packages": { + "get": { + "operationId": "get:virtual_machine_packages", + "tags": [ + "Core" + ], + "parameters": [ + { + "name": "page", + "in": "query", + "schema": { + "type": "integer" + } + }, + { + "name": "per_page", + "in": "query", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Return the currently available virtual machine packages", + "content": { + "application/json": { + "schema": { + "properties": { + "pagination": { + "$ref": "#/components/schemas/PaginationObject" + }, + "packages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/VirtualMachinePackage" + }, + "description": "All available virtual machine packages" + } + }, + "required": [ + "pagination", + "packages" + ] + } + } + } + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + }, + "/data_centers": { + "get": { + "operationId": "get:data_centers", + "tags": [ + "Core" + ], + "parameters": [ + + ], + "responses": { + "200": { + "description": "Provides a full list of all data centers", + "content": { + "application/json": { + "schema": { + "properties": { + "data_centers": { + "type": "array", + "items": { + "$ref": "#/components/schemas/DataCenter" + } + } + }, + "required": [ + "data_centers" + ] + } + } + } + }, + "403": { + "$ref": "#/components/responses/APIAuthenticator403Response" + }, + "429": { + "$ref": "#/components/responses/APIAuthenticator429Response" + } + } + } + } + }, + "components": { + "schemas": { + "SignupCampaignArguments": { + "description": "All 'campaign[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "type": "string" + }, + "medium": { + "type": "string" + }, + "term": { + "type": "string" + }, + "content": { + "type": "string" + } + } + }, + "InternalAuthError": { + "type": "object", + "properties": { + "details": { + "type": "string" + } + } + }, + "InternalAuthErrorEnum": { + "type": "string", + "enum": [ + "internal_auth_error" + ] + }, + "InvalidCouponCode": { + "type": "object", + "properties": { + "code": { + "type": "string" + } + } + }, + "InvalidCouponCodeEnum": { + "type": "string", + "enum": [ + "invalid_coupon_code" + ] + }, + "ValidationError": { + "properties": { + "errors": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "ValidationErrorEnum": { + "type": "string", + "enum": [ + "validation_error" + ] + }, + "RateLimitReached": { + "type": "object", + "properties": { + "total_permitted": { + "type": "integer", + "description": "The total number of requests per minute that are permitted" + } + } + }, + "RateLimitReachedEnum": { + "type": "string", + "enum": [ + "rate_limit_reached" + ] + }, + "GetPricingPrices200ResponsePrices": { + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "category": { + "type": "string" + }, + "description": { + "type": "string" + }, + "variants": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PriceVariant" + } + } + } + }, + "PriceVariant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "default": { + "type": "boolean" + }, + "prices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Price" + } + } + } + }, + "Price": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "price": { + "type": "number", + "format": "float" + }, + "currency": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Currency" + } + } + } + }, + "Currency": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "iso_code": { + "type": "string" + }, + "symbol": { + "type": "string" + } + } + }, + "PricingEstimateResourceArguments": { + "description": "All 'resources[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "quantity": { + "type": "integer" + } + } + }, + "CustomerTypeEnum": { + "type": "string", + "enum": [ + "consumer", + "business" + ] + }, + "CurrencyLookup": { + "description": "All 'currency[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "iso_code": { + "type": "string" + } + } + }, + "CountryLookup": { + "description": "All 'country[]' params are mutually exclusive, only one can be provided.", + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "iso_code2": { + "type": "string" + }, + "iso_code3": { + "type": "string" + } + } + }, + "PricingEstimate": { + "properties": { + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PricingEstimateResource" + } + }, + "per_month": { + "type": "number", + "format": "float" + }, + "per_month_inc_tax": { + "type": "number", + "format": "float" + }, + "per_hour": { + "type": "number", + "format": "float" + }, + "per_hour_inc_tax": { + "type": "number", + "format": "float" + }, + "currency": { + "$ref": "#/components/schemas/Currency" + }, + "tax_rate": { + "type": "number", + "format": "float" + }, + "pdf_url": { + "type": "string" + } + }, + "type": "object" + }, + "PricingEstimateResource": { + "type": "object", + "properties": { + "resource": { + "type": "string" + }, + "description": { + "type": "string" + }, + "quantity": { + "type": "integer" + }, + "per_month": { + "type": "number", + "format": "float" + }, + "per_month_inc_tax": { + "type": "number", + "format": "float" + }, + "per_month_each": { + "type": "number", + "format": "float" + }, + "per_hour": { + "type": "number", + "format": "float" + }, + "per_hour_inc_tax": { + "type": "number", + "format": "float" + }, + "per_hour_each": { + "type": "number", + "format": "float" + }, + "package": { + "allOf": [ + { + "$ref": "#/components/schemas/VirtualMachinePackage" + } + ], + "nullable": true + } + } + }, + "VirtualMachinePackage": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "permalink": { + "type": "string" + }, + "cpu_cores": { + "type": "integer" + }, + "ipv4_addresses": { + "type": "integer" + }, + "memory_in_gb": { + "type": "integer" + }, + "storage_in_gb": { + "type": "integer" + }, + "monthly_bandwidth_allowance_in_gb": { + "type": "integer", + "nullable": true + }, + "privacy": { + "$ref": "#/components/schemas/PrivacyTypesEnum" + }, + "icon": { + "allOf": [ + { + "$ref": "#/components/schemas/Attachment" + } + ], + "nullable": true + }, + "use_dedicated_cpus": { + "type": "boolean" + } + } + }, + "PrivacyTypesEnum": { + "type": "string", + "enum": [ + "public", + "private" + ] + }, + "Attachment": { + "type": "object", + "properties": { + "url": { + "type": "string" + }, + "file_name": { + "type": "string" + }, + "file_type": { + "type": "string" + }, + "file_size": { + "type": "integer" + }, + "digest": { + "type": "string" + }, + "token": { + "type": "string" + } + } + }, + "MissingResourcesEnum": { + "type": "string", + "enum": [ + "missing_resources" + ] + }, + "MissingResourcesSchema": { + "type": "object", + "description": "You must provide at least one resource in the resources array", + "properties": { + "code": { + "$ref": "#/components/schemas/MissingResourcesEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "type": "object" + } + } + }, + "InvalidEstimateResource": { + "type": "object", + "properties": { + "resource": { + "type": "string", + "nullable": true + } + } + }, + "InvalidEstimateResourceEnum": { + "type": "string", + "enum": [ + "invalid_estimate_resource" + ] + }, + "InvalidEstimateResourceSchema": { + "type": "object", + "description": "The provided resource is not valid", + "properties": { + "code": { + "$ref": "#/components/schemas/InvalidEstimateResourceEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "$ref": "#/components/schemas/InvalidEstimateResource" + } + } + }, + "InvalidEstimateQuantity": { + "type": "object", + "properties": { + "resource": { + "type": "string", + "nullable": true + } + } + }, + "InvalidEstimateQuantityEnum": { + "type": "string", + "enum": [ + "invalid_estimate_quantity" + ] + }, + "InvalidEstimateQuantitySchema": { + "type": "object", + "description": "The quantity for the provided resource must be greater than zero", + "properties": { + "code": { + "$ref": "#/components/schemas/InvalidEstimateQuantityEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "$ref": "#/components/schemas/InvalidEstimateQuantity" + } + } + }, + "OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res": { + "oneOf": [ + { + "$ref": "#/components/schemas/MissingResourcesSchema" + }, + { + "$ref": "#/components/schemas/InvalidEstimateResourceSchema" + }, + { + "$ref": "#/components/schemas/InvalidEstimateQuantitySchema" + } + ] + }, + "CurrencyNotFoundEnum": { + "type": "string", + "enum": [ + "currency_not_found" + ] + }, + "CurrencyNotFoundSchema": { + "type": "object", + "description": "No currency was found matching any of the criteria provided in the arguments", + "properties": { + "code": { + "$ref": "#/components/schemas/CurrencyNotFoundEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "type": "object" + } + } + }, + "CountryNotFoundEnum": { + "type": "string", + "enum": [ + "country_not_found" + ] + }, + "CountryNotFoundSchema": { + "type": "object", + "description": "No country was found matching any of the criteria provided in the arguments", + "properties": { + "code": { + "$ref": "#/components/schemas/CountryNotFoundEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "type": "object" + } + } + }, + "OneOfCountryNotFoundCurrencyNotFound404Res": { + "oneOf": [ + { + "$ref": "#/components/schemas/CurrencyNotFoundSchema" + }, + { + "$ref": "#/components/schemas/CountryNotFoundSchema" + } + ] + }, + "PaginationObject": { + "type": "object", + "properties": { + "current_page": { + "type": "integer", + "description": "The current page" + }, + "total_pages": { + "type": "integer", + "description": "The total number of pages", + "nullable": true + }, + "total": { + "type": "integer", + "description": "The total number of items across all pages", + "nullable": true + }, + "per_page": { + "type": "integer", + "description": "The number of items per page" + }, + "large_set": { + "type": "boolean", + "description": "Is this a large set and therefore the total number of records cannot be returned?" + } + } + }, + "DataCenter": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "permalink": { + "type": "string" + }, + "country": { + "type": "string" + } + } + } + }, + "responses": { + "APIAuthenticator403Response": { + "description": "403 error response", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "$ref": "#/components/schemas/InternalAuthErrorEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "$ref": "#/components/schemas/InternalAuthError" + } + } + } + } + } + }, + "InvalidCouponCodeResponse": { + "description": "The provided coupon code is not valid", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "$ref": "#/components/schemas/InvalidCouponCodeEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "$ref": "#/components/schemas/InvalidCouponCode" + } + } + } + } + } + }, + "ValidationErrorResponse": { + "description": "A validation error occurred with the object that was being created/updated/deleted", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "$ref": "#/components/schemas/ValidationErrorEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + } + } + }, + "APIAuthenticator429Response": { + "description": "You have reached the rate limit for this type of request", + "content": { + "application/json": { + "schema": { + "properties": { + "code": { + "$ref": "#/components/schemas/RateLimitReachedEnum" + }, + "description": { + "type": "string" + }, + "detail": { + "$ref": "#/components/schemas/RateLimitReached" + } + } + } + } + } + }, + "InvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res": { + "description": "400 error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res" + } + } + } + }, + "CountryNotFoundCurrencyNotFound404Res": { + "description": "404 error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OneOfCountryNotFoundCurrencyNotFound404Res" + } + } + } + } + } + }, + "security": [ + + ] +} \ No newline at end of file diff --git a/next/public/public.go b/next/public/public.go new file mode 100644 index 0000000..193e33a --- /dev/null +++ b/next/public/public.go @@ -0,0 +1,1601 @@ +// Package public provides primitives to interact with the openapi HTTP API. +// +// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT. +package public + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "strings" + + "github.com/deepmap/oapi-codegen/v2/pkg/securityprovider" + "github.com/oapi-codegen/runtime" +) + +// Defines values for CountryNotFoundEnum. +const ( + CountryNotFound CountryNotFoundEnum = "country_not_found" +) + +// Defines values for CurrencyNotFoundEnum. +const ( + CurrencyNotFound CurrencyNotFoundEnum = "currency_not_found" +) + +// Defines values for CustomerTypeEnum. +const ( + Business CustomerTypeEnum = "business" + Consumer CustomerTypeEnum = "consumer" +) + +// Defines values for InternalAuthErrorEnum. +const ( + InternalAuthErrorEnumInternalAuthError InternalAuthErrorEnum = "internal_auth_error" +) + +// Defines values for InvalidCouponCodeEnum. +const ( + InvalidCouponCodeEnumInvalidCouponCode InvalidCouponCodeEnum = "invalid_coupon_code" +) + +// Defines values for InvalidEstimateQuantityEnum. +const ( + InvalidEstimateQuantityEnumInvalidEstimateQuantity InvalidEstimateQuantityEnum = "invalid_estimate_quantity" +) + +// Defines values for InvalidEstimateResourceEnum. +const ( + InvalidEstimateResourceEnumInvalidEstimateResource InvalidEstimateResourceEnum = "invalid_estimate_resource" +) + +// Defines values for MissingResourcesEnum. +const ( + MissingResources MissingResourcesEnum = "missing_resources" +) + +// Defines values for PrivacyTypesEnum. +const ( + Private PrivacyTypesEnum = "private" + Public PrivacyTypesEnum = "public" +) + +// Defines values for RateLimitReachedEnum. +const ( + RateLimitReachedEnumRateLimitReached RateLimitReachedEnum = "rate_limit_reached" +) + +// Defines values for ValidationErrorEnum. +const ( + ValidationErrorEnumValidationError ValidationErrorEnum = "validation_error" +) + +// Attachment defines model for Attachment. +type Attachment struct { + Digest *string `json:"digest,omitempty"` + FileName *string `json:"file_name,omitempty"` + FileSize *int `json:"file_size,omitempty"` + FileType *string `json:"file_type,omitempty"` + Token *string `json:"token,omitempty"` + Url *string `json:"url,omitempty"` +} + +// CountryLookup All 'country[]' params are mutually exclusive, only one can be provided. +type CountryLookup struct { + Id *string `json:"id,omitempty"` + IsoCode2 *string `json:"iso_code2,omitempty"` + IsoCode3 *string `json:"iso_code3,omitempty"` +} + +// CountryNotFoundEnum defines model for CountryNotFoundEnum. +type CountryNotFoundEnum string + +// CountryNotFoundSchema No country was found matching any of the criteria provided in the arguments +type CountryNotFoundSchema struct { + Code *CountryNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// Currency defines model for Currency. +type Currency struct { + Id *string `json:"id,omitempty"` + IsoCode *string `json:"iso_code,omitempty"` + Name *string `json:"name,omitempty"` + Symbol *string `json:"symbol,omitempty"` +} + +// CurrencyLookup All 'currency[]' params are mutually exclusive, only one can be provided. +type CurrencyLookup struct { + Id *string `json:"id,omitempty"` + IsoCode *string `json:"iso_code,omitempty"` +} + +// CurrencyNotFoundEnum defines model for CurrencyNotFoundEnum. +type CurrencyNotFoundEnum string + +// CurrencyNotFoundSchema No currency was found matching any of the criteria provided in the arguments +type CurrencyNotFoundSchema struct { + Code *CurrencyNotFoundEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// CustomerTypeEnum defines model for CustomerTypeEnum. +type CustomerTypeEnum string + +// DataCenter defines model for DataCenter. +type DataCenter struct { + Country *string `json:"country,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` +} + +// GetPricingPrices200ResponsePrices defines model for GetPricingPrices200ResponsePrices. +type GetPricingPrices200ResponsePrices struct { + Category *string `json:"category,omitempty"` + Description *string `json:"description,omitempty"` + Resource *string `json:"resource,omitempty"` + Variants *[]PriceVariant `json:"variants,omitempty"` +} + +// InternalAuthError defines model for InternalAuthError. +type InternalAuthError struct { + Details *string `json:"details,omitempty"` +} + +// InternalAuthErrorEnum defines model for InternalAuthErrorEnum. +type InternalAuthErrorEnum string + +// InvalidCouponCode defines model for InvalidCouponCode. +type InvalidCouponCode struct { + Code *string `json:"code,omitempty"` +} + +// InvalidCouponCodeEnum defines model for InvalidCouponCodeEnum. +type InvalidCouponCodeEnum string + +// InvalidEstimateQuantity defines model for InvalidEstimateQuantity. +type InvalidEstimateQuantity struct { + Resource *string `json:"resource"` +} + +// InvalidEstimateQuantityEnum defines model for InvalidEstimateQuantityEnum. +type InvalidEstimateQuantityEnum string + +// InvalidEstimateQuantitySchema The quantity for the provided resource must be greater than zero +type InvalidEstimateQuantitySchema struct { + Code *InvalidEstimateQuantityEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *InvalidEstimateQuantity `json:"detail,omitempty"` +} + +// InvalidEstimateResource defines model for InvalidEstimateResource. +type InvalidEstimateResource struct { + Resource *string `json:"resource"` +} + +// InvalidEstimateResourceEnum defines model for InvalidEstimateResourceEnum. +type InvalidEstimateResourceEnum string + +// InvalidEstimateResourceSchema The provided resource is not valid +type InvalidEstimateResourceSchema struct { + Code *InvalidEstimateResourceEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *InvalidEstimateResource `json:"detail,omitempty"` +} + +// MissingResourcesEnum defines model for MissingResourcesEnum. +type MissingResourcesEnum string + +// MissingResourcesSchema You must provide at least one resource in the resources array +type MissingResourcesSchema struct { + Code *MissingResourcesEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *map[string]interface{} `json:"detail,omitempty"` +} + +// OneOfCountryNotFoundCurrencyNotFound404Res defines model for OneOfCountryNotFoundCurrencyNotFound404Res. +type OneOfCountryNotFoundCurrencyNotFound404Res struct { + union json.RawMessage +} + +// OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res defines model for OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res. +type OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res struct { + union json.RawMessage +} + +// PaginationObject defines model for PaginationObject. +type PaginationObject struct { + // CurrentPage The current page + CurrentPage *int `json:"current_page,omitempty"` + + // LargeSet Is this a large set and therefore the total number of records cannot be returned? + LargeSet *bool `json:"large_set,omitempty"` + + // PerPage The number of items per page + PerPage *int `json:"per_page,omitempty"` + + // Total The total number of items across all pages + Total *int `json:"total"` + + // TotalPages The total number of pages + TotalPages *int `json:"total_pages"` +} + +// Price defines model for Price. +type Price struct { + Currency *[]Currency `json:"currency,omitempty"` + Id *string `json:"id,omitempty"` + Price *float32 `json:"price,omitempty"` +} + +// PriceVariant defines model for PriceVariant. +type PriceVariant struct { + Default *bool `json:"default,omitempty"` + Description *string `json:"description"` + Id *string `json:"id"` + Prices *[]Price `json:"prices,omitempty"` +} + +// PricingEstimate defines model for PricingEstimate. +type PricingEstimate struct { + Currency *Currency `json:"currency,omitempty"` + PdfUrl *string `json:"pdf_url,omitempty"` + PerHour *float32 `json:"per_hour,omitempty"` + PerHourIncTax *float32 `json:"per_hour_inc_tax,omitempty"` + PerMonth *float32 `json:"per_month,omitempty"` + PerMonthIncTax *float32 `json:"per_month_inc_tax,omitempty"` + Resources *[]PricingEstimateResource `json:"resources,omitempty"` + TaxRate *float32 `json:"tax_rate,omitempty"` +} + +// PricingEstimateResource defines model for PricingEstimateResource. +type PricingEstimateResource struct { + Description *string `json:"description,omitempty"` + Package *VirtualMachinePackage `json:"package"` + PerHour *float32 `json:"per_hour,omitempty"` + PerHourEach *float32 `json:"per_hour_each,omitempty"` + PerHourIncTax *float32 `json:"per_hour_inc_tax,omitempty"` + PerMonth *float32 `json:"per_month,omitempty"` + PerMonthEach *float32 `json:"per_month_each,omitempty"` + PerMonthIncTax *float32 `json:"per_month_inc_tax,omitempty"` + Quantity *int `json:"quantity,omitempty"` + Resource *string `json:"resource,omitempty"` +} + +// PricingEstimateResourceArguments All 'resources[]' params are mutually exclusive, only one can be provided. +type PricingEstimateResourceArguments struct { + Quantity *int `json:"quantity,omitempty"` + Resource *string `json:"resource,omitempty"` +} + +// PrivacyTypesEnum defines model for PrivacyTypesEnum. +type PrivacyTypesEnum string + +// RateLimitReached defines model for RateLimitReached. +type RateLimitReached struct { + // TotalPermitted The total number of requests per minute that are permitted + TotalPermitted *int `json:"total_permitted,omitempty"` +} + +// RateLimitReachedEnum defines model for RateLimitReachedEnum. +type RateLimitReachedEnum string + +// SignupCampaignArguments All 'campaign[]' params are mutually exclusive, only one can be provided. +type SignupCampaignArguments struct { + Content *string `json:"content,omitempty"` + Id *string `json:"id,omitempty"` + Medium *string `json:"medium,omitempty"` + Name *string `json:"name,omitempty"` + Source *string `json:"source,omitempty"` + Term *string `json:"term,omitempty"` +} + +// ValidationError defines model for ValidationError. +type ValidationError struct { + Errors *[]string `json:"errors,omitempty"` +} + +// ValidationErrorEnum defines model for ValidationErrorEnum. +type ValidationErrorEnum string + +// VirtualMachinePackage defines model for VirtualMachinePackage. +type VirtualMachinePackage struct { + CpuCores *int `json:"cpu_cores,omitempty"` + Icon *Attachment `json:"icon"` + Id *string `json:"id,omitempty"` + Ipv4Addresses *int `json:"ipv4_addresses,omitempty"` + MemoryInGb *int `json:"memory_in_gb,omitempty"` + MonthlyBandwidthAllowanceInGb *int `json:"monthly_bandwidth_allowance_in_gb"` + Name *string `json:"name,omitempty"` + Permalink *string `json:"permalink,omitempty"` + Privacy *PrivacyTypesEnum `json:"privacy,omitempty"` + StorageInGb *int `json:"storage_in_gb,omitempty"` + UseDedicatedCpus *bool `json:"use_dedicated_cpus,omitempty"` +} + +// APIAuthenticator403Response defines model for APIAuthenticator403Response. +type APIAuthenticator403Response struct { + Code *InternalAuthErrorEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *InternalAuthError `json:"detail,omitempty"` +} + +// APIAuthenticator429Response defines model for APIAuthenticator429Response. +type APIAuthenticator429Response struct { + Code *RateLimitReachedEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *RateLimitReached `json:"detail,omitempty"` +} + +// CountryNotFoundCurrencyNotFound404Res defines model for CountryNotFoundCurrencyNotFound404Res. +type CountryNotFoundCurrencyNotFound404Res = OneOfCountryNotFoundCurrencyNotFound404Res + +// InvalidCouponCodeResponse defines model for InvalidCouponCodeResponse. +type InvalidCouponCodeResponse struct { + Code *InvalidCouponCodeEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *InvalidCouponCode `json:"detail,omitempty"` +} + +// InvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res defines model for InvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res. +type InvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res = OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res + +// ValidationErrorResponse defines model for ValidationErrorResponse. +type ValidationErrorResponse struct { + Code *ValidationErrorEnum `json:"code,omitempty"` + Description *string `json:"description,omitempty"` + Detail *ValidationError `json:"detail,omitempty"` +} + +// PostPricingEstimateJSONBody defines parameters for PostPricingEstimate. +type PostPricingEstimateJSONBody struct { + // Country All 'country[]' params are mutually exclusive, only one can be provided. + Country CountryLookup `json:"country"` + + // Currency All 'currency[]' params are mutually exclusive, only one can be provided. + Currency CurrencyLookup `json:"currency"` + + // CustomerName The customer's name + CustomerName string `json:"customer_name"` + CustomerType CustomerTypeEnum `json:"customer_type"` + Resources []PricingEstimateResourceArguments `json:"resources"` +} + +// PostSignupsJSONBody defines parameters for PostSignups. +type PostSignupsJSONBody struct { + // Campaign All 'campaign[]' params are mutually exclusive, only one can be provided. + Campaign *SignupCampaignArguments `json:"campaign,omitempty"` + + // Coupon The code for the coupon that will be applied to the first new organization created by the user + Coupon *string `json:"coupon,omitempty"` + + // EmailAddress The e-mail address that should receive the welcome e-mail + EmailAddress string `json:"email_address"` +} + +// GetVirtualMachinePackagesParams defines parameters for GetVirtualMachinePackages. +type GetVirtualMachinePackagesParams struct { + Page *int `form:"page,omitempty" json:"page,omitempty"` + PerPage *int `form:"per_page,omitempty" json:"per_page,omitempty"` +} + +// PostPricingEstimateJSONRequestBody defines body for PostPricingEstimate for application/json ContentType. +type PostPricingEstimateJSONRequestBody PostPricingEstimateJSONBody + +// PostSignupsJSONRequestBody defines body for PostSignups for application/json ContentType. +type PostSignupsJSONRequestBody PostSignupsJSONBody + +// AsCurrencyNotFoundSchema returns the union data inside the OneOfCountryNotFoundCurrencyNotFound404Res as a CurrencyNotFoundSchema +func (t OneOfCountryNotFoundCurrencyNotFound404Res) AsCurrencyNotFoundSchema() (CurrencyNotFoundSchema, error) { + var body CurrencyNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCurrencyNotFoundSchema overwrites any union data inside the OneOfCountryNotFoundCurrencyNotFound404Res as the provided CurrencyNotFoundSchema +func (t *OneOfCountryNotFoundCurrencyNotFound404Res) FromCurrencyNotFoundSchema(v CurrencyNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCurrencyNotFoundSchema performs a merge with any union data inside the OneOfCountryNotFoundCurrencyNotFound404Res, using the provided CurrencyNotFoundSchema +func (t *OneOfCountryNotFoundCurrencyNotFound404Res) MergeCurrencyNotFoundSchema(v CurrencyNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsCountryNotFoundSchema returns the union data inside the OneOfCountryNotFoundCurrencyNotFound404Res as a CountryNotFoundSchema +func (t OneOfCountryNotFoundCurrencyNotFound404Res) AsCountryNotFoundSchema() (CountryNotFoundSchema, error) { + var body CountryNotFoundSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromCountryNotFoundSchema overwrites any union data inside the OneOfCountryNotFoundCurrencyNotFound404Res as the provided CountryNotFoundSchema +func (t *OneOfCountryNotFoundCurrencyNotFound404Res) FromCountryNotFoundSchema(v CountryNotFoundSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeCountryNotFoundSchema performs a merge with any union data inside the OneOfCountryNotFoundCurrencyNotFound404Res, using the provided CountryNotFoundSchema +func (t *OneOfCountryNotFoundCurrencyNotFound404Res) MergeCountryNotFoundSchema(v CountryNotFoundSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfCountryNotFoundCurrencyNotFound404Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfCountryNotFoundCurrencyNotFound404Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +// AsMissingResourcesSchema returns the union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res as a MissingResourcesSchema +func (t OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) AsMissingResourcesSchema() (MissingResourcesSchema, error) { + var body MissingResourcesSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromMissingResourcesSchema overwrites any union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res as the provided MissingResourcesSchema +func (t *OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) FromMissingResourcesSchema(v MissingResourcesSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeMissingResourcesSchema performs a merge with any union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res, using the provided MissingResourcesSchema +func (t *OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) MergeMissingResourcesSchema(v MissingResourcesSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidEstimateResourceSchema returns the union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res as a InvalidEstimateResourceSchema +func (t OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) AsInvalidEstimateResourceSchema() (InvalidEstimateResourceSchema, error) { + var body InvalidEstimateResourceSchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidEstimateResourceSchema overwrites any union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res as the provided InvalidEstimateResourceSchema +func (t *OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) FromInvalidEstimateResourceSchema(v InvalidEstimateResourceSchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidEstimateResourceSchema performs a merge with any union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res, using the provided InvalidEstimateResourceSchema +func (t *OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) MergeInvalidEstimateResourceSchema(v InvalidEstimateResourceSchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +// AsInvalidEstimateQuantitySchema returns the union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res as a InvalidEstimateQuantitySchema +func (t OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) AsInvalidEstimateQuantitySchema() (InvalidEstimateQuantitySchema, error) { + var body InvalidEstimateQuantitySchema + err := json.Unmarshal(t.union, &body) + return body, err +} + +// FromInvalidEstimateQuantitySchema overwrites any union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res as the provided InvalidEstimateQuantitySchema +func (t *OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) FromInvalidEstimateQuantitySchema(v InvalidEstimateQuantitySchema) error { + b, err := json.Marshal(v) + t.union = b + return err +} + +// MergeInvalidEstimateQuantitySchema performs a merge with any union data inside the OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res, using the provided InvalidEstimateQuantitySchema +func (t *OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) MergeInvalidEstimateQuantitySchema(v InvalidEstimateQuantitySchema) error { + b, err := json.Marshal(v) + if err != nil { + return err + } + + merged, err := runtime.JSONMerge(t.union, b) + t.union = merged + return err +} + +func (t OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) MarshalJSON() ([]byte, error) { + b, err := t.union.MarshalJSON() + return b, err +} + +func (t *OneOfInvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res) UnmarshalJSON(b []byte) error { + err := t.union.UnmarshalJSON(b) + return err +} + +const ( + clientVersion = "0.2.0" // x-release-please-version +) + +// RequestEditorFn is the function signature for the RequestEditor callback function +type RequestEditorFn func(ctx context.Context, req *http.Request) error + +// Doer performs HTTP requests. +// +// The standard http.Client implements this interface. +type HttpRequestDoer interface { + Do(req *http.Request) (*http.Response, error) +} + +// Client which conforms to the OpenAPI3 specification for this service. +type Client struct { + // The endpoint of the server conforming to this interface, with scheme, + // https://api.deepmap.com for example. This can contain a path relative + // to the server, such as https://api.deepmap.com/dev-test, and all the + // paths in the swagger spec will be appended to the server. + Server string + + // Doer for performing requests, typically a *http.Client with any + // customized settings, such as certificate chains. + Client HttpRequestDoer + + // A list of callbacks for modifying requests which are generated before sending over + // the network. + RequestEditors []RequestEditorFn +} + +// ClientOption allows setting custom parameters during construction +type ClientOption func(*Client) error + +// Creates a new Client, with reasonable defaults +func NewClient(server string, token string, opts ...ClientOption) (*Client, error) { + // create a client with sane default values + client := Client{ + Server: server, + } + + bearerTokenProvider, bearerTokenProviderErr := securityprovider.NewSecurityProviderBearerToken(token) + if bearerTokenProviderErr != nil { + return nil, bearerTokenProviderErr + } + + client.RequestEditors = append(client.RequestEditors, bearerTokenProvider.Intercept) + client.RequestEditors = append(client.RequestEditors, func(ctx context.Context, req *http.Request) error { + req.Header.Set("User-Agent", "go-katapult/"+clientVersion) + + return nil + }) + + // mutate client and add all optional params + for _, o := range opts { + if err := o(&client); err != nil { + return nil, err + } + } + + // ensure the server URL always has a trailing slash + if !strings.HasSuffix(client.Server, "/") { + client.Server += "/" + } + // create httpClient, if not already present + if client.Client == nil { + client.Client = &http.Client{} + } + return &client, nil +} + +// WithHTTPClient allows overriding the default Doer, which is +// automatically created using http.Client. This is useful for tests. +func WithHTTPClient(doer HttpRequestDoer) ClientOption { + return func(c *Client) error { + c.Client = doer + return nil + } +} + +// WithRequestEditorFn allows setting up a callback function, which will be +// called right before sending the request. This can be used to mutate the request. +func WithRequestEditorFn(fn RequestEditorFn) ClientOption { + return func(c *Client) error { + c.RequestEditors = append(c.RequestEditors, fn) + return nil + } +} + +// The interface specification for the client above. +type ClientInterface interface { + // GetDataCenters request + GetDataCenters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostPricingEstimateWithBody request with any body + PostPricingEstimateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostPricingEstimate(ctx context.Context, body PostPricingEstimateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetPricingPrices request + GetPricingPrices(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // PostSignupsWithBody request with any body + PostSignupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + + PostSignups(ctx context.Context, body PostSignupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetStats request + GetStats(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + + // GetVirtualMachinePackages request + GetVirtualMachinePackages(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) +} + +func (c *Client) GetDataCenters(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetDataCentersRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPricingEstimateWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPricingEstimateRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostPricingEstimate(ctx context.Context, body PostPricingEstimateJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostPricingEstimateRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetPricingPrices(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetPricingPricesRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostSignupsWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostSignupsRequestWithBody(c.Server, contentType, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) PostSignups(ctx context.Context, body PostSignupsJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewPostSignupsRequest(c.Server, body) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetStats(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetStatsRequest(c.Server) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +func (c *Client) GetVirtualMachinePackages(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVirtualMachinePackagesRequest(c.Server, params) + if err != nil { + return nil, err + } + req = req.WithContext(ctx) + if err := c.applyEditors(ctx, req, reqEditors); err != nil { + return nil, err + } + return c.Client.Do(req) +} + +// NewGetDataCentersRequest generates requests for GetDataCenters +func NewGetDataCentersRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/data_centers") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostPricingEstimateRequest calls the generic PostPricingEstimate builder with application/json body +func NewPostPricingEstimateRequest(server string, body PostPricingEstimateJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostPricingEstimateRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostPricingEstimateRequestWithBody generates requests for PostPricingEstimate with any type of body +func NewPostPricingEstimateRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/pricing/estimate") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetPricingPricesRequest generates requests for GetPricingPrices +func NewGetPricingPricesRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/pricing/prices") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewPostSignupsRequest calls the generic PostSignups builder with application/json body +func NewPostSignupsRequest(server string, body PostSignupsJSONRequestBody) (*http.Request, error) { + var bodyReader io.Reader + buf, err := json.Marshal(body) + if err != nil { + return nil, err + } + bodyReader = bytes.NewReader(buf) + return NewPostSignupsRequestWithBody(server, "application/json", bodyReader) +} + +// NewPostSignupsRequestWithBody generates requests for PostSignups with any type of body +func NewPostSignupsRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/signups") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", queryURL.String(), body) + if err != nil { + return nil, err + } + + req.Header.Add("Content-Type", contentType) + + return req, nil +} + +// NewGetStatsRequest generates requests for GetStats +func NewGetStatsRequest(server string) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/stats") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +// NewGetVirtualMachinePackagesRequest generates requests for GetVirtualMachinePackages +func NewGetVirtualMachinePackagesRequest(server string, params *GetVirtualMachinePackagesParams) (*http.Request, error) { + var err error + + serverURL, err := url.Parse(server) + if err != nil { + return nil, err + } + + operationPath := fmt.Sprintf("/virtual_machine_packages") + if operationPath[0] == '/' { + operationPath = "." + operationPath + } + + queryURL, err := serverURL.Parse(operationPath) + if err != nil { + return nil, err + } + + if params != nil { + queryValues := queryURL.Query() + + if params.Page != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "page", runtime.ParamLocationQuery, *params.Page); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + if params.PerPage != nil { + + if queryFrag, err := runtime.StyleParamWithLocation("form", true, "per_page", runtime.ParamLocationQuery, *params.PerPage); err != nil { + return nil, err + } else if parsed, err := url.ParseQuery(queryFrag); err != nil { + return nil, err + } else { + for k, v := range parsed { + for _, v2 := range v { + queryValues.Add(k, v2) + } + } + } + + } + + queryURL.RawQuery = queryValues.Encode() + } + + req, err := http.NewRequest("GET", queryURL.String(), nil) + if err != nil { + return nil, err + } + + return req, nil +} + +func (c *Client) applyEditors(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn) error { + for _, r := range c.RequestEditors { + if err := r(ctx, req); err != nil { + return err + } + } + for _, r := range additionalEditors { + if err := r(ctx, req); err != nil { + return err + } + } + return nil +} // ClientWithResponses builds on ClientInterface to offer response payloads +type ClientWithResponses struct { + ClientInterface +} + +// NewClientWithResponses creates a new ClientWithResponses, which wraps +// Client with return type handling +func NewClientWithResponses(server string, token string, opts ...ClientOption) (*ClientWithResponses, error) { + client, err := NewClient(server, token, opts...) + if err != nil { + return nil, err + } + return &ClientWithResponses{client}, nil +} + +// WithBaseURL overrides the baseURL. +func WithBaseURL(baseURL string) ClientOption { + return func(c *Client) error { + newBaseURL, err := url.Parse(baseURL) + if err != nil { + return err + } + c.Server = newBaseURL.String() + return nil + } +} + +// ClientWithResponsesInterface is the interface specification for the client with responses above. +type ClientWithResponsesInterface interface { + // GetDataCentersWithResponse request + GetDataCentersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDataCentersResponse, error) + + // PostPricingEstimateWithBodyWithResponse request with any body + PostPricingEstimateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPricingEstimateResponse, error) + + PostPricingEstimateWithResponse(ctx context.Context, body PostPricingEstimateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPricingEstimateResponse, error) + + // GetPricingPricesWithResponse request + GetPricingPricesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPricingPricesResponse, error) + + // PostSignupsWithBodyWithResponse request with any body + PostSignupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSignupsResponse, error) + + PostSignupsWithResponse(ctx context.Context, body PostSignupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSignupsResponse, error) + + // GetStatsWithResponse request + GetStatsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatsResponse, error) + + // GetVirtualMachinePackagesWithResponse request + GetVirtualMachinePackagesWithResponse(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackagesResponse, error) +} + +type GetDataCentersResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + DataCenters []DataCenter `json:"data_centers"` + } + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetDataCentersResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetDataCentersResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostPricingEstimateResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Estimate The estimate, including breakdown, for a Katapult configuration + Estimate PricingEstimate `json:"estimate"` + } + JSON400 *InvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res + JSON403 *APIAuthenticator403Response + JSON404 *CountryNotFoundCurrencyNotFound404Res + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostPricingEstimateResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostPricingEstimateResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetPricingPricesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Prices The prices in the default price plan + Prices []GetPricingPrices200ResponsePrices `json:"prices"` + } + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetPricingPricesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetPricingPricesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type PostSignupsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // EmailAddress The e-mail address that was sent the welcome email + EmailAddress string `json:"email_address"` + + // Id The ID of the signup + Id string `json:"id"` + } + JSON403 *APIAuthenticator403Response + JSON404 *InvalidCouponCodeResponse + JSON422 *ValidationErrorResponse + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r PostSignupsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r PostSignupsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetStatsResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // TotalBlockStorage The total amount of block storage (in GB) + TotalBlockStorage int `json:"total_block_storage"` + + // TotalCpuCores The total number of CPU cores + TotalCpuCores int `json:"total_cpu_cores"` + + // TotalMemory The total amount of memory (in GB) + TotalMemory int `json:"total_memory"` + + // TotalOrganizations The number of organizations + TotalOrganizations int `json:"total_organizations"` + + // TotalVirtualMachinesLaunched The number of virtual machines launched (all time) + TotalVirtualMachinesLaunched int `json:"total_virtual_machines_launched"` + + // TotalVirtualMachinesLaunchedToday The number of virtual machines launched today + TotalVirtualMachinesLaunchedToday int `json:"total_virtual_machines_launched_today"` + } + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetStatsResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetStatsResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +type GetVirtualMachinePackagesResponse struct { + Body []byte + HTTPResponse *http.Response + JSON200 *struct { + // Packages All available virtual machine packages + Packages []VirtualMachinePackage `json:"packages"` + Pagination PaginationObject `json:"pagination"` + } + JSON403 *APIAuthenticator403Response + JSON429 *APIAuthenticator429Response +} + +// Status returns HTTPResponse.Status +func (r GetVirtualMachinePackagesResponse) Status() string { + if r.HTTPResponse != nil { + return r.HTTPResponse.Status + } + return http.StatusText(0) +} + +// StatusCode returns HTTPResponse.StatusCode +func (r GetVirtualMachinePackagesResponse) StatusCode() int { + if r.HTTPResponse != nil { + return r.HTTPResponse.StatusCode + } + return 0 +} + +// GetDataCentersWithResponse request returning *GetDataCentersResponse +func (c *ClientWithResponses) GetDataCentersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDataCentersResponse, error) { + rsp, err := c.GetDataCenters(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetDataCentersResponse(rsp) +} + +// PostPricingEstimateWithBodyWithResponse request with arbitrary body returning *PostPricingEstimateResponse +func (c *ClientWithResponses) PostPricingEstimateWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostPricingEstimateResponse, error) { + rsp, err := c.PostPricingEstimateWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPricingEstimateResponse(rsp) +} + +func (c *ClientWithResponses) PostPricingEstimateWithResponse(ctx context.Context, body PostPricingEstimateJSONRequestBody, reqEditors ...RequestEditorFn) (*PostPricingEstimateResponse, error) { + rsp, err := c.PostPricingEstimate(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostPricingEstimateResponse(rsp) +} + +// GetPricingPricesWithResponse request returning *GetPricingPricesResponse +func (c *ClientWithResponses) GetPricingPricesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetPricingPricesResponse, error) { + rsp, err := c.GetPricingPrices(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetPricingPricesResponse(rsp) +} + +// PostSignupsWithBodyWithResponse request with arbitrary body returning *PostSignupsResponse +func (c *ClientWithResponses) PostSignupsWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*PostSignupsResponse, error) { + rsp, err := c.PostSignupsWithBody(ctx, contentType, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostSignupsResponse(rsp) +} + +func (c *ClientWithResponses) PostSignupsWithResponse(ctx context.Context, body PostSignupsJSONRequestBody, reqEditors ...RequestEditorFn) (*PostSignupsResponse, error) { + rsp, err := c.PostSignups(ctx, body, reqEditors...) + if err != nil { + return nil, err + } + return ParsePostSignupsResponse(rsp) +} + +// GetStatsWithResponse request returning *GetStatsResponse +func (c *ClientWithResponses) GetStatsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetStatsResponse, error) { + rsp, err := c.GetStats(ctx, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetStatsResponse(rsp) +} + +// GetVirtualMachinePackagesWithResponse request returning *GetVirtualMachinePackagesResponse +func (c *ClientWithResponses) GetVirtualMachinePackagesWithResponse(ctx context.Context, params *GetVirtualMachinePackagesParams, reqEditors ...RequestEditorFn) (*GetVirtualMachinePackagesResponse, error) { + rsp, err := c.GetVirtualMachinePackages(ctx, params, reqEditors...) + if err != nil { + return nil, err + } + return ParseGetVirtualMachinePackagesResponse(rsp) +} + +// ParseGetDataCentersResponse parses an HTTP response from a GetDataCentersWithResponse call +func ParseGetDataCentersResponse(rsp *http.Response) (*GetDataCentersResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetDataCentersResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + DataCenters []DataCenter `json:"data_centers"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostPricingEstimateResponse parses an HTTP response from a PostPricingEstimateWithResponse call +func ParsePostPricingEstimateResponse(rsp *http.Response) (*PostPricingEstimateResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostPricingEstimateResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Estimate The estimate, including breakdown, for a Katapult configuration + Estimate PricingEstimate `json:"estimate"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 400: + var dest InvalidEstimateQuantityInvalidEstimateResourceMissingResources400Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON400 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest CountryNotFoundCurrencyNotFound404Res + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetPricingPricesResponse parses an HTTP response from a GetPricingPricesWithResponse call +func ParseGetPricingPricesResponse(rsp *http.Response) (*GetPricingPricesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetPricingPricesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Prices The prices in the default price plan + Prices []GetPricingPrices200ResponsePrices `json:"prices"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParsePostSignupsResponse parses an HTTP response from a PostSignupsWithResponse call +func ParsePostSignupsResponse(rsp *http.Response) (*PostSignupsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &PostSignupsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // EmailAddress The e-mail address that was sent the welcome email + EmailAddress string `json:"email_address"` + + // Id The ID of the signup + Id string `json:"id"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: + var dest InvalidCouponCodeResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON404 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 422: + var dest ValidationErrorResponse + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON422 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetStatsResponse parses an HTTP response from a GetStatsWithResponse call +func ParseGetStatsResponse(rsp *http.Response) (*GetStatsResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetStatsResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // TotalBlockStorage The total amount of block storage (in GB) + TotalBlockStorage int `json:"total_block_storage"` + + // TotalCpuCores The total number of CPU cores + TotalCpuCores int `json:"total_cpu_cores"` + + // TotalMemory The total amount of memory (in GB) + TotalMemory int `json:"total_memory"` + + // TotalOrganizations The number of organizations + TotalOrganizations int `json:"total_organizations"` + + // TotalVirtualMachinesLaunched The number of virtual machines launched (all time) + TotalVirtualMachinesLaunched int `json:"total_virtual_machines_launched"` + + // TotalVirtualMachinesLaunchedToday The number of virtual machines launched today + TotalVirtualMachinesLaunchedToday int `json:"total_virtual_machines_launched_today"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +} + +// ParseGetVirtualMachinePackagesResponse parses an HTTP response from a GetVirtualMachinePackagesWithResponse call +func ParseGetVirtualMachinePackagesResponse(rsp *http.Response) (*GetVirtualMachinePackagesResponse, error) { + bodyBytes, err := io.ReadAll(rsp.Body) + defer func() { _ = rsp.Body.Close() }() + if err != nil { + return nil, err + } + + response := &GetVirtualMachinePackagesResponse{ + Body: bodyBytes, + HTTPResponse: rsp, + } + + switch { + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: + var dest struct { + // Packages All available virtual machine packages + Packages []VirtualMachinePackage `json:"packages"` + Pagination PaginationObject `json:"pagination"` + } + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON200 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest APIAuthenticator403Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 429: + var dest APIAuthenticator429Response + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON429 = &dest + + } + + return response, nil +}